Re: [slightlyoff/ServiceWorker] Allow caches to opt-in to granular cleanup (#863)

> As I don't know the details about storage API perhaps what I'm going to comment is already covered but it would be convenient to have some kind of functional event triggered under memory pressure that allow us to implement a resource release strategy or to opt for a built-in one.

I believe this is what @slightlyoff has favored in the past (and now?), but gecko storage folks don't like it.  Some of our reasons:

1) Spinning up potentially hundreds or thousands of origin service workers to fire an event, which may or may not remove enough space, is a non-trivial thing to do in terms of memory/cpu.
2) Origins don't have enough information to reason about what to remove.  Has this game level been accessed more recently than resources in other origins?  It has no idea.

I feel like I'm missing one.  Maybe @sicking remembers.

So from the gecko team's perspective we prefer an API that lets an origin declare the relative persistence of data and then let the browser reason about those resources in aggregate.  The browser can make better decisions with a master list of frecency.  Right now that list just operates at the origin level, but the proposed spec would let entries in the frecency list refer to individual boxes or individual items within a box.

---
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/863#issuecomment-204468703

Received on Friday, 1 April 2016 16:53:20 UTC