libresilient/plugins/cache
Michał "rysiek" Woźniak 34b87e5ad2 Rewriting tests into Deno 2023-09-26 20:32:54 +00:00
..
__tests__ Rewriting tests into Deno 2023-09-26 20:32:54 +00:00
README.md documenting plugins (ref. #51) 2022-05-17 23:36:08 +00:00
index.js Rewriting tests into Deno 2023-09-26 20:32:54 +00:00

README.md

Plugin: cache

The cache plugin uses the Cache API to save content in visitor's browser for later use (when offline or when the website is down for whatever reason, for instance).

As a stashing plugin, it is handled in a special way by LibResilient:

  • if any plugin configured before cache returns a successful response, the cache plugin caches it for later use.
  • if no plugin configured before cache succeeds, cache returns the cached response; afterwards, plugins configured after cache are run in the background to try retrieving a fresher response; if any of them succeeds, cache plugin caches it for later use.

Configuration

The cache plugin does not have any configuration options.