- From: Ben Kelly <notifications@github.com>
- Date: Wed, 06 Apr 2016 09:55:50 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Wednesday, 6 April 2016 16:56:17 UTC
At face value this looks easy, but its possible to have a Cache objects that is not in CacheStorage under any name. Today you can get this with: ``` var cache; caches.open('foo').then(function(c) { cache = c; return caches.delete('foo'); }).then(function() { // cache exists and is usable, but not stored under a name any more }); ``` Also, we have discussed allowing Cache objects to be constructed without CacheStorage. Something like `new Cache()` would not have a name in CacheStorage either. It also seems like renaming Cache objects could be possible in the future. I would be more in favor of adding a way to query the name of a particular Cache object. Something like `caches.getNameFor(cache).then(function(name) { /* use name */ })`. --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/869#issuecomment-206463236
Received on Wednesday, 6 April 2016 16:56:17 UTC