Fix caching

This commit is contained in:
video-prize-ranch 2023-08-10 02:49:06 +00:00 committed by video-prize-ranch
parent 7467792ae9
commit 52ae1fc9d5

View File

@ -93,6 +93,9 @@ func main() {
app.Use(cache.New(cache.Config{
Expiration: 30 * time.Minute,
MaxBytes: 25000000,
KeyGenerator: func(c *fiber.Ctx) string {
return c.Path() + c.Query("q") + c.Query("no_webp")
},
CacheControl: true,
StoreResponseHeaders: true,
}))