jokes-bapak2/api/app/v1/platform/cache/cache.go

17 lines
244 B
Go
Raw Normal View History

package cache
import (
"log"
"time"
"github.com/allegro/bigcache/v3"
)
func InMemory() *bigcache.BigCache {
cache, err := bigcache.NewBigCache(bigcache.DefaultConfig(6 * time.Hour))
if err != nil {
log.Fatalln(err)
}
return cache
}