go-cache/flush.go

9 lines
139 B
Go

package gocache
func (cache *myCache) Flush() {
cache.mutex.Lock()
defer cache.mutex.Unlock()
cache.items = make(map[string]*value)
}