Skip to content

Commit

Permalink
Update cache.md
Browse files Browse the repository at this point in the history
Add new MaxBytes param to cache docs from gofiber/fiber#1892
  • Loading branch information
dranikpg authored May 10, 2022
1 parent c0318bf commit b6312e4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions api/middleware/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ type Config struct {
//
// Default: false
StoreResponseHeaders bool

// Max number of bytes of response bodies simultaneously stored in cache. When limit is reached,
// entries with the nearest expiration are deleted to make room for new.
// 0 means no limit
//
// Default: 0
MaxBytes uint
}
```

Expand All @@ -116,9 +123,10 @@ var ConfigDefault = Config{
KeyGenerator: func(c *fiber.Ctx) string {
return utils.CopyString(c.Path())
},
ExpirationGenerator : nil,
ExpirationGenerator: nil,
StoreResponseHeaders: false,
Storage: nil,
Storage: nil,
MaxBytes: 0,
}
```

0 comments on commit b6312e4

Please sign in to comment.