You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

offline-persistence-toolkit is not honoring the max-age



Content (required):

We are implementing the 'offline-persistence-toolkit' in our code with getCacheFirstStrategy for client side caching.

As per documentation "Responses from REST services to your application must not include either the no-cache or no-store value in the Cache-Control HTTP header as these values prevent the toolkit from working in your application"

So accordingly our API's are not returning those headers. The caching part works fine.

But our expectation was the toolkit will honor the max-age header and if the data is stale it will browserFetch instead of fetching from cache. But that does not seem to happen. So , are we missing something here?

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!