rendertron icon indicating copy to clipboard operation
rendertron copied to clipboard

refreschCache param doesnt work with Service Worker

Open Hexmage opened this issue 5 years ago • 3 comments

We are using a Service Worker to cache GraphQl responses for 2 hours. Sadly this has the side effect that Rendertron is using this Service Worker caching as well, even when using the refreshCache param.

I would have expected the refreshParm to also stop this from happening.

Hexmage avatar Dec 06 '19 15:12 Hexmage

Could you share a test case for this? And if you want to give fixing it a go, let me know!

AVGP avatar Dec 06 '19 19:12 AVGP

@AVGP I have the following Scenario:

  • We are using a graphql call to obtain the contents of a page.
  • We have a service-worker.js which caches the graphql call.
  • Sometimes the graphql call, causes a error on fetching the data. This is now cached by Rendertron.
  • Using the refreshCache=true parameter does not flush the service-worker.
  • Restarting Rendertron does remove this cache.

Hexmage avatar Jan 13 '20 08:01 Hexmage

Right, sounds like there's a bunch of stuff going on. Would you be able to reproduce this on a super simple web page that uses a service worker that loads and caches some simple data?

AVGP avatar Feb 07 '20 10:02 AVGP