And what about explicitly marking them for disposal? What if we provide a general disposal queue and the developer can simply mark a response as disposable:
```js
let response = await Caches.match(request);
if (response) {
handle(response);
response.isDisposable(true); // adds to the disposal queue
}
```
It gives control over semantics to the developer. We can provide extra parameters to common methods to ease batch operations:
```js
let keys = await cache.keys(request, { disposable: true });
keys[keys.length - 1].isDisposable(false); // all matches are disposable except the last one
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/863#issuecomment-353027923