Skip to content

Commit

Permalink
キャッシュの保持時間を短く
Browse files Browse the repository at this point in the history
  • Loading branch information
nexryai committed Jan 27, 2024
1 parent fa096e2 commit 5033d1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ func main() {
// キャッシュする
app.Use(cache.New(cache.Config{
ExpirationGenerator: func(c *fiber.Ctx, cfg *cache.Config) time.Duration {
// 4時間
return time.Hour * 4
// 15分
return time.Minute * 15
},
KeyGenerator: func(c *fiber.Ctx) string {
// パスが違ってもクエリが同じなら同じ内容
Expand Down

0 comments on commit 5033d1d

Please sign in to comment.