mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-29 22:26:15 -06:00
use ttlcache
This commit is contained in:
parent
73fc5cf2f0
commit
cf1dcdf46a
7 changed files with 15 additions and 66 deletions
9
internal/cache/store.go
vendored
9
internal/cache/store.go
vendored
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue