0

I am using sw-toolbox to implement service worker. I am creating caches by giving cache name in toolbox.router.get function. but still it is creating a default cache with name($$$toolbox-cache$$$http://localhost/bank-po-practice/$$$$$$inactive$$$)

toolbox.router.get('/js/*', toolbox.cacheFirst, {cache : {name : 
cacheMap.js, maxEntries: 5}});
toolbox.router.get('/views/partials/practice/*', toolbox.cacheFirst, 
{cache : {name : cacheMap.html, maxEntries: 5}});

Actually I don't need that cache as I am defining cache name every time, so it is always empty. So how can I prevent that from creating?

  • It's just something that happens, as the act of opening a cache with a given name creates the cache, even if there are no entries. `sw-toolbox` doesn't know in advance whether you're going to use the default cache, so it always opens it. This shouldn't be taking up storage room or causing problems, so hopefully you can just ignore it. – Jeff Posnick Apr 20 '17 at 15:08
  • thanks for the help – Aditya Chhikara Apr 22 '17 at 09:56

0 Answers0