Was sad to discover that Service Worker cache doesn't respect HTTP cache directives. Opportunity for someone to make a HTTPCache lib tho.
-
-
Replying to @marcosc
@slightlylate@jaffathecake, do you have a pointer to the relevant discussion? Didn't find much useful info in the repo.1 reply 0 retweets 0 likes -
Replying to @marcosc
@marcosc@slightlylate relevant in terms of what? If the cache API behaved like the http cache there'd be no point having it1 reply 0 retweets 2 likes -
Replying to @jaffathecake
@jaffathecake@marcosc : indeed. The whole point is to be able to *know* what's in your cache and manage that manually1 reply 0 retweets 0 likes -
Replying to @slightlylate
@jaffathecake@marcosc : and if you want HTTP eviction behaviour, just don't use the SW Cache API; SWs sit "in front" of netstack1 reply 0 retweets 0 likes -
Replying to @slightlylate
@jaffathecake@marcosc : that means anything fetch()'d from a SW will hit HTTP cache on the way out. SW cache solves a different problem.1 reply 0 retweets 1 like -
Replying to @slightlylate
@slightlylate@jaffathecake the assets are synthetically generated by the page tho. Not on network.1 reply 0 retweets 2 likes -
Replying to @marcosc
@slightlylate@jaffathecake don't know if it helps, but concrete example (search for saveBinaryToCache) https://github.com/mozilla/remote-newtab/pull/66/files …1 reply 0 retweets 0 likes
@marcosc: this is a case where you want your own TTL logic (and I'd assume a separate cache for these assets).
/cc @jaffathecake
-
-
Replying to @slightlylate
@slightlylate@jaffathecake yep, already got multiple caches. Will add logic, but maybe something for v2 spec?1 reply 0 retweets 1 like -
Replying to @marcosc
@marcosc: it comes up more than I anticipated, but what most folks seem to want is "auto discard", not HTTP semantics /cc@jaffathecake2 replies 0 retweets 0 likes - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
& Web Standards TL; Blink API OWNER
Named PWAs w/
DMs open. Tweets my own; press@google.com for official comms.