jperasmus / stale-while-revalidate-cache

Storage-agnostic and configurable stale-while-revalidate cache helper for any function, for any JavaScript environment.
MIT License
62 stars 5 forks source link

Feature/persist with options #43

Closed enzolupia closed 3 months ago

enzolupia commented 3 months ago

Motivation

Allow defining custom options for manual data persisting.

Example scenario:

A developer may not want to expose globally both SWR and Cache Storage, but still need to persist data with different ttl or other configurations.