-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persist caches #19
Comments
My proposal is to put them in a LevelDB – x-platform and very Node-y. |
Cool. If the caches can't be explored on disk it'd be great to have a url Actually, since there's programmatic cache access, this could be written as
|
So, more thinking about this:
http-google-com.json
[
{
"name": "shell-v2",
"items": {
"some-url": { ... }
}
},
{ "name": "contents-v2", "items": { ... } },
...
]
|
More thinking, new data structure schema: /*
caches/
origin/
cache-xyz789.json
bodies/
body-123abc.json
*/
// cache-xyz789.json
{
items: [{
state: 'pending/fulfilled/rejected',
request: { ... },
resonse: {
... ,
body: 'body-123abc'
}
}]
}
// body-123abc.json
{
body: [123, 456, 789]
}
/*
cache-lists/
some-origin.json
*/
// some-origin.json
{
caches: [{
name: 'app-cache',
id: 'cache-xyz789'
}]
} |
For the sake of the polyfill, garbage collecting caches when the worker is shut down is fine |
|
…put them somewhere smarter. Probably just a directory.
Need to make sure they're cleaned up or reused when serviceworker restarts.
The text was updated successfully, but these errors were encountered: