// Purge clears everything from the cache
10684
func (lru *TTLRUCache) Purge() {
	lru.lock.Lock()
	defer lru.lock.Unlock()

	lru.mapping = make(map[interface{}]*triple)
	lru.order = list.New()
	lru.timeorder = list.New()
}
1023560
func (c *LRUCache) Purge() {
	c.mu.Lock()
	defer c.mu.Unlock()

	if c.purgeVisitorFunc != nil {
		for key, item := range c.items {
			it := item.Value.(*lruItem)
			v := it.value
			c.purgeVisitorFunc(key, v)
		}
	}

	c.init()
}
275645
func (c *MysqlCacher) Flush() error {
	_, err := c.c.Exec("DELETE FROM cache")
	return err
}
800285
func (c *MemcacheCacher) Delete(key string) error {
	return c.c.Delete(key)
}
1367630
func (c *InMemoryCache) Clear() {
	c.mu.Lock()
	c.items = map[string]Thunk{}
	c.mu.Unlock()
}
691947
func (b *Backend) PurgeState(taskUUID string) error {
	return b.getClient().Delete(taskUUID)
}
73963
func (s *storeImpl) Purge() {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	s.objects = map[string]object{}
}
625234
func (l *Loader) ClearAll() Interface {
	l.cacheLock.Lock()
	l.cache.Clear()
	l.cacheLock.Unlock()
	return l
}
1121638
func (c *Cache) Delete(host string) {
	c.Lock()
	defer c.Unlock()
	delete(c.Clients, host)
}
1017320
func (_m *Store) PurgeByTxids(txids []string) error {
	ret := _m.Called(txids)

	var r0 error
	if rf, ok := ret.Get(0).(func([]string) error); ok {
		r0 = rf(txids)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
1228061
func (b *Backend) PurgeState(taskUUID string) error {
	conn := b.open()
	defer conn.Close()

	_, err := conn.Do("DEL", taskUUID)
	if err != nil {
		return err
	}

	return nil
}
429562
func (b *Backend) PurgeGroupMeta(groupUUID string) error {
	conn, channel, err := b.Open(b.GetConfig().Broker, b.GetConfig().TLSConfig)
	if err != nil {
		return err
	}
	defer b.Close(channel, conn)

	b.DeleteQueue(channel, amqmChordTriggeredQueue(groupUUID))

	return b.DeleteQueue(channel, groupUUID)
}
132473
func (a *Agent) purgeService(serviceID string) error {
	svcPath := filepath.Join(a.config.DataDir, servicesDir, stringHash(serviceID))
	if _, err := os.Stat(svcPath); err == nil {
		return os.Remove(svcPath)
	}
	return nil
}
908116
func (c *Cacher) Reset(data map[string]interface{}) {
	c.mu.Lock()
	defer c.mu.Unlock()
	c.data = data
}
572080
func (t *TombstoneGC) purgeBin(expires time.Time) uint64 {
	t.Lock()
	defer t.Unlock()

	// Get the maximum index and clear the entry. It's possible that the GC
	// has been shut down while this timer fired and got blocked on the lock,
	// so if there's nothing in the map for us we just exit out since there
	// is no work to do.
	exp, ok := t.expires[expires]
	if !ok {
		return 0
	}
	delete(t.expires, expires)
	return exp.maxIndex
}
1322308
func (c *cache) Purge() {
	c.Lock()
	defer c.Unlock()
	now := c.now()

	// Nuke all threat entries based on their positive TTL.
	for fullHash, threatTTLs := range c.pttls {
		for td, pttl := range threatTTLs {
			if now.After(pttl) {
				del := true
				for i := minHashPrefixLength; i <= maxHashPrefixLength; i++ {
					if nttl, ok := c.nttls[fullHash[:i]]; ok {
						if nttl.After(pttl) {
							del = false
							break
						}
					}
				}
				if del {
					delete(threatTTLs, td)
				}
			}
		}
		if len(threatTTLs) == 0 {
			delete(c.pttls, fullHash)
		}
	}

	// Nuke all partial hashes based on their negative TTL.
	for partialHash, nttl := range c.nttls {
		if now.After(nttl) {
			delete(c.nttls, partialHash)
		}
	}
}
1143428
func (c *Cache) Reset() {
	c.Lock()
	defer c.Unlock()
	c.m = make(map[string]*list.Element, c.config.MaxItems)
	c.l.Init()
	c.size = 0
}