mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-10-28 20:23:47 +08:00
improvement (metadata): add new metadatas for better display control from the backend handler
This commit is contained in:
@ -31,6 +31,11 @@ func (a *AppCache) Set(key map[string]string, value interface{}) {
|
||||
a.Cache.Set(fmt.Sprint(hash), value, cache.DefaultExpiration)
|
||||
}
|
||||
|
||||
func (a *AppCache) Del(key map[string]string) {
|
||||
hash, _ := hashstructure.Hash(key, nil)
|
||||
a.Cache.Delete(fmt.Sprint(hash))
|
||||
}
|
||||
|
||||
func (a *AppCache) OnEvict(fn func(string, interface{})) {
|
||||
a.Cache.OnEvicted(fn)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user