// clear deletes all items from the cache.
161774
func (c *cacher) clear() {
	c.lock.Lock()
	defer c.lock.Unlock()

	c.cache = make(map[string]*futures.Future, 10)
}
654470
func (t *TxStructure) Clear(key []byte) error {
	if t.readWriter == nil {
		return errWriteOnSnapshot
	}
	ek := t.encodeStringDataKey(key)
	err := t.readWriter.Delete(ek)
	if kv.ErrNotExist.Equal(err) {
		err = nil
	}
	return errors.Trace(err)
}
602557
func (c *writer) clear() {
	if c.lines != 0 {
		fmt.Fprintf(c.out, moveCursorUp, c.lines)
	}
	c.lines = 0
}
1048659
func (s *Session) Clear() {
	s.mu.Lock()
	s.provider.db.Clear(s.sid)
	s.isNew = false
	s.mu.Unlock()
}
219236
func (r *Render) clear(cursor int) {
	r.move(cursor, 0)
	r.out.EraseDown()
}
1122059
func (ml *MemoryLogger) Clear() {
	ml.mu.Lock()
	ml.Events = nil
	ml.mu.Unlock()
}
986789
func (c *DOMStorage) Clear(storageId *DOMStorageStorageId) (*gcdmessage.ChromeResponse, error) {
	var v DOMStorageClearParams
	v.StorageId = storageId
	return c.ClearWithParams(&v)
}
364063
func (h *BytesRefHash) Clear(resetPool bool) {
	h.lastCount = h.count
	h.count = 0
	if resetPool {
		h.pool.Reset(false, false) // we don't need to 0-fill the bufferes
	}
	h.bytesStart = h.bytesStartArray.Clear()
	if h.lastCount != -1 && h.shrink(h.lastCount) {
		// shurnk clears the hash entries
		return
	}
	for i, _ := range h.ids {
		h.ids[i] = -1
	}
}
712638
func (f *Form) Clear(includeButtons bool) *Form {
	f.items = nil
	if includeButtons {
		f.buttons = nil
	}
	f.focusedElement = 0
	return f
}
87984
func (b *Buffer) Clear() {
	b.array = make([]float64, bufferDefaultCapacity)
	b.head = 0
	b.tail = 0
	b.size = 0
}
1367867
func (b *Batch) Clear() {
	b.cont.Triangles.SetLen(0)
	b.cont.Dirty()
}
625234
func (l *Loader) ClearAll() Interface {
	l.cacheLock.Lock()
	l.cache.Clear()
	l.cacheLock.Unlock()
	return l
}
99037
func (ht *HashTable) Clear() (err error) {
	if err = ht.DataFile.Clear(); err != nil {
		return
	}
	ht.calculateNumBuckets()
	return
}
209336
func (e *Echo) Clear(middleware ...interface{}) {
	if len(middleware) > 0 {
		for _, dm := range middleware {
			var decr int
			for i, m := range e.middleware {
				if m != dm {
					continue
				}
				i -= decr
				start := i + 1
				if start < len(e.middleware) {
					e.middleware = append(e.middleware[0:i], e.middleware[start:]...)
				} else {
					e.middleware = e.middleware[0:i]
				}
				decr++
			}
		}
	} else {
		e.middleware = []interface{}{}
	}
	e.head = nil
}
924117
func (f *Flash) Clear() {
	if f.Count() > 0 {
		f.changed = true
	}
	f.v = nil
}
359430
func (b *LRUCache) Clear() int {
	b.lock.Lock()
	defer b.lock.Unlock()

	// First, remove entries that have expiry set
	l := len(b.priorityQueue)
	for i := 0; i < l; i++ {
		// This could be reduced to O(n).
		b.removeEntry(b.priorityQueue[0])
	}

	// Second, remove all remaining entries
	r := b.lruList.Len()
	for i := 0; i < r; i++ {
		b.removeEntry(b.leastUsedEntry())
	}
	return l + r
}
1084246
func (s *FeatureFlagSet) Clear() {
	s.Lock()
	defer s.Unlock()
	s.features = make(map[Feature]*featureSlot)
}