I have this module test:
var myCache = await caches.open("test"); // create a new cache
await myCache.add(new Request("/index.html")); // page was sucessfully stored
await caches.delete("test");
myCache.match("/index.html"); // I still read from deleted cache!
After the cache was deleted, I don't see it anymore in browser inspector, but I still get the Response from the .match
method. I'd expect error here, please explain this unexpected behaviour.
Seems like a confusion on MDN site where they describe CacheStorage.delete as
If fact the object is NOT deleted. The W3C specifies that the cacheJobPromise just
So just the key in the map is deleted, not the object itself.