Ver Fonte

TTLCache

Alexey Kim há 1 ano atrás
pai
commit
45b618fbb7
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      cache/ttl_cache.go

+ 1 - 1
cache/ttl_cache.go

@@ -10,7 +10,7 @@ type ttlCache struct {
 	buf *expirable.LRU[string, []byte]
 }
 
-func New(size int, ttl time.Duration) Cache {
+func NewTTLCache(size int, ttl time.Duration) Cache {
 	c := &ttlCache{}
 	c.buf = expirable.NewLRU[string, []byte](size, nil, ttl)
 	return c