Skip to content

Commit

Permalink
Clarify the description of cache invalidator
Browse files Browse the repository at this point in the history
  • Loading branch information
hcancelik committed Jun 15, 2024
1 parent 2e20a93 commit 3c6eff5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/middleware/cache.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ app.Use(cache.New(cache.Config{
},
}))
```
The `CacheInvalidator` function allows you to define custom conditions for cache invalidation. Return true if conditions such as specific query parameters or headers are met, which require the cache to be invalidated. For example, in this code, the cache is invalidated when the query parameter invalidateCache is set to true.

## Config

Expand Down

0 comments on commit 3c6eff5

Please sign in to comment.