Lenz: bisschen server

This commit is contained in:
Simon Martens
2025-03-19 17:05:56 +01:00
parent 5681f4f352
commit 1a1fe6b838
2 changed files with 37 additions and 13 deletions

21
server/cache.go Normal file
View File

@@ -0,0 +1,21 @@
package server
import (
"time"
"github.com/gofiber/storage/memory/v2"
)
type Cache struct {
*memory.Storage
}
const (
CACHE_GC_INTERVAL = 24 * time.Hour
)
func NewCache() Cache {
return Cache{memory.New(memory.Config{
GCInterval: CACHE_GC_INTERVAL,
})}
}