Financial-Times / n-service-worker

❌ DECOMMISSIONED Global service worker component for next.ft.com
5 stars 2 forks source link

Expire on install #139

Closed alexflorisca closed 6 years ago

alexflorisca commented 6 years ago

Check caches and delete the expire ones only on install. This should hopefully speed up the service worker a bit.

I used service-worker-mock package to test the install event handler and I want to refactor a lot of the tests to use this instead of karma, keeping only a few as integration tests running in an actual browser - but that's for a different PR

PR is a bit difficult to read because of linting changes as well - my bad. Basically: