kopia lustrzana https://github.com/reiver/greatape
feat(cache): ✨ enhance inproc cache
rodzic
caddf18315
commit
d33df3d527
|
@ -33,3 +33,10 @@ func (cache *inproc) Get(key string) interface{} {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (cache *inproc) Remove(key string) {
|
||||
cache.Lock()
|
||||
defer cache.Unlock()
|
||||
|
||||
delete(cache.collection, key)
|
||||
}
|
||||
|
|
|
@ -6,5 +6,6 @@ type (
|
|||
ICache interface {
|
||||
Put(string, interface{})
|
||||
Get(string) interface{}
|
||||
Remove(string)
|
||||
}
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue