Commit fb4ec9d0 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Add a TimedCache.DropEntry method.

parent 561c7984
......@@ -62,6 +62,13 @@ func (me *TimedCache) Set(name string, val interface{}) {
}
}
func (me *TimedCache) DropEntry(name string) {
me.cacheMapMutex.Lock()
defer me.cacheMapMutex.Unlock()
me.cacheMap[name] = nil, false
}
func (me *TimedCache) getDataNoCache(name string) interface{} {
data := me.fetch(name)
me.Set(name, data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment