http-cache-semantics icon indicating copy to clipboard operation
http-cache-semantics copied to clipboard

How to check if a non-blocking revalidation should happen?

Open mmkal opened this issue 2 years ago • 0 comments

Hi, love this library! A great addition would be a brief sample implementation of how to use policy.useStaleWhileRevalidate() in the readme. I haven't quite got my head around how to use it in combination with satisfiesWithoutRevalidation.

Basically, I'd like to know when to kick off a background request in order to update the cache, but it's still ok to use the value that's already in the cache.

mmkal avatar May 10 '23 04:05 mmkal