Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Cache with maxAgeSeconds option not expiring for cacheFirst strategy #279

Open
nnagakarthikeyan opened this issue Dec 20, 2017 · 0 comments

Comments

@nnagakarthikeyan
Copy link

In my localhost for a cacheFirst strategy if "maxAgeSeconds" option is set for the custom cache , it is never getting expired after the defined interval and always getting the old cached response.

Also made sure in my cached response the date header is present

Also the indexedDB contains the exact timestamp of the requested url.

Below is the sw-toolbox version detail

"sw-toolbox" : "^3.6.1"

Below is the sample code were the caching strategy is applied.

toolbox.router.get(/sam/v1/productDetails/k-21225F91386049$/, toolbox.cacheFirst,{
cache: {
name: 'product details cache',
maxAgeSeconds: 5
}
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant