Alexey Kim 1 年之前
父节点
当前提交
45b618fbb7
共有 1 个文件被更改,包括 1 次插入1 次删除
  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