docs: add SVR.JS Cache mod notes
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m4s
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m4s
This commit is contained in:
parent
b7be6a4504
commit
097ca4fba5
1 changed files with 14 additions and 0 deletions
|
@ -180,6 +180,20 @@ It's also recommended to forbid the access to ".env" file, ".svelte-kit" and ".g
|
|||
|
||||
_View the [change log.](/changelog/sveltekit-integration)_
|
||||
|
||||
## SVR.JS Cache mod
|
||||
|
||||
SVR.JS Cache mod is a simple in-memory cache mod for SVR.JS that works with "Cache-Control" and "Vary" headers. The cache is a per-worker cache.
|
||||
|
||||
This mod adds these SVR.JS configuration properties:
|
||||
- _cacheVaryHeaders_ (Array of Strings)
|
||||
- A list of headers that can vary in a cache. Supplements the "Vary" response header.
|
||||
- _maximumCacheResponseSize_ (Number or `null`)
|
||||
- A maximum response size to be cached in bytes. If `null`, the maximum response size is limited to the maximum size of JavaScript strings.
|
||||
|
||||
If you use this mod with SVR.JS's static file serving functionality, set the caching headers for the cache to work, and add "ETag" and "Accept-Encoding" to either a list of headers in a _Vary_ header or in the _cacheVaryHeaders_ property in the SVR.JS configuration.
|
||||
|
||||
_View the [change log.](/changelog/svrjs-cache-mod)_
|
||||
|
||||
## YellowSquare
|
||||
|
||||
YellowSquare is a JSGI (JavaScript Gateway Interface) engine.
|
||||
|
|
Loading…
Reference in a new issue