mirror of
https://github.com/Theodor-Springmann-Stiftung/lenz-web.git
synced 2025-10-29 01:05:32 +00:00
Cache Key Gen
This commit is contained in:
@@ -3,6 +3,7 @@ package server
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
"github.com/gofiber/storage/memory/v2"
|
||||
)
|
||||
|
||||
@@ -17,5 +18,10 @@ const (
|
||||
func NewCache() Cache {
|
||||
return Cache{memory.New(memory.Config{
|
||||
GCInterval: CACHE_GC_INTERVAL,
|
||||
})}
|
||||
}),
|
||||
}
|
||||
}
|
||||
|
||||
func KeyGenerator(c *fiber.Ctx) string {
|
||||
return c.Path() + c.Context().QueryArgs().String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user