ttlcache
ttlcache copied to clipboard
close funct
func (cache *Cache) close() {
cache.mutex.Lock()
for key, item := range cache.items {
delete(cache.items, key)
}
}
cache.mutex.Unlock()
}