use ttlcache

This commit is contained in:
tsmethurst 2021-08-19 16:16:16 +02:00
commit cf1dcdf46a
7 changed files with 15 additions and 66 deletions

View file

@ -18,14 +18,7 @@
package cache
import "time"
func (c *cache) Store(k string, v interface{}) error {
ce := &cacheEntry{
updated: time.Now(),
value: v,
}
c.stored.Store(k, ce)
c.c.Set(k, v)
return nil
}