📝 Cache readme and docs update (#2169)

* Update README.md

* update no-store request directive

added cache status unreachable

* Update cache.go
pull/2173/head
marcmartin13 2022-10-25 13:52:28 +08:00 committed by GitHub
parent 156b81c768
commit 4d584c9c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -2,9 +2,9 @@
Cache middleware for [Fiber](https://github.com/gofiber/fiber) designed to intercept responses and cache them. This middleware will cache the `Body`, `Content-Type` and `StatusCode` using the `c.Path()` (or a string returned by the Key function) as unique identifier. Special thanks to [@codemicro](https://github.com/codemicro/fiber-cache) for creating this middleware for Fiber core!
Request Directives
The no-cache request directive will return the up-to-date response but still caches it. You will always get a "miss" cache status.
The no-store request directive will refrain from caching. You will always get the up-to-date response.
Request Directives<br>
`Cache-Control: no-cache` will return the up-to-date response but still caches it. You will always get a `miss` cache status.<br>
`Cache-Control: no-store` will refrain from caching. You will always get the up-to-date response.
## Table of Contents