Ghost/ghost/mw-cache-control
e.baidakova 93c6abcad5 Add ability to pass stale-while-revalidate option to cache control
closes TryGhost/Team#2094
This value can be used for non-crucial data with a `public` option. For example: `public, max-age=1, stale-while-revalidate=9`.
The idea behind this option is that the browser would cache the value for the number of seconds in `max-age` and would use it for the number of seconds in `stale-while-revalidate` until it gets a "validated response" from the server. The behaviour should be almost unnoticeable for the end user but would make a big difference in the amount of requests to server.
2022-11-02 10:54:12 +04:00
..
lib Add ability to pass stale-while-revalidate option to cache control 2022-11-02 10:54:12 +04:00
test Add ability to pass stale-while-revalidate option to cache control 2022-11-02 10:54:12 +04:00
.eslintrc.js
index.js
package.json Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
README.md

Mw Cache Control

Cache-Control middleware for Ghost

Usage

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests