improvement (metadata): add new metadatas for better display control from the backend handler

This commit is contained in:
Mickael KERJEAN
2019-02-06 23:16:51 +11:00
parent 464abe07b1
commit f0732b69fe
8 changed files with 48 additions and 11 deletions

View File

@ -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)
}