From e81d2acb68d79f0d0c2e1d9888031215964c81f5 Mon Sep 17 00:00:00 2001 From: serr Date: Mon, 6 Jan 2025 00:14:48 +0300 Subject: [PATCH] rename --- simplecache.go => candycache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename simplecache.go => candycache.go (98%) diff --git a/simplecache.go b/candycache.go similarity index 98% rename from simplecache.go rename to candycache.go index 32a741c..c22aac9 100644 --- a/simplecache.go +++ b/candycache.go @@ -1,4 +1,4 @@ -package simplecache +package candycache import ( "errors" @@ -29,7 +29,7 @@ type Cache struct { // NewCache создает новый экземпляр Cache с интервалом очистки cleanupInterval. // Если cleanupInterval < 0, то кэш не будет очищаться автоматически. -func NewCache(cleanupInterval time.Duration) *Cache { +func Cacher(cleanupInterval time.Duration) *Cache { cache := &Cache{ storage: make(map[string]Item), cleanupInterval: cleanupInterval,