mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-07-20 09:58:23 +00:00
Fix caching
This commit is contained in:
parent
7467792ae9
commit
52ae1fc9d5
3
main.go
3
main.go
@ -93,6 +93,9 @@ func main() {
|
|||||||
app.Use(cache.New(cache.Config{
|
app.Use(cache.New(cache.Config{
|
||||||
Expiration: 30 * time.Minute,
|
Expiration: 30 * time.Minute,
|
||||||
MaxBytes: 25000000,
|
MaxBytes: 25000000,
|
||||||
|
KeyGenerator: func(c *fiber.Ctx) string {
|
||||||
|
return c.Path() + c.Query("q") + c.Query("no_webp")
|
||||||
|
},
|
||||||
CacheControl: true,
|
CacheControl: true,
|
||||||
StoreResponseHeaders: true,
|
StoreResponseHeaders: true,
|
||||||
}))
|
}))
|
||||||
|
Loading…
Reference in New Issue
Block a user