[w3c/ServiceWorker] Provide a simple synchronous k-v storage for ServiceWorker? (#981)

It seems to me the only storage currently exists in ServiceWorker is Cache, which is designed for storing request-response pair.

However, sometimes the worker may just want to store some simple data in a key-value storage which can be read/write synchronously (like `localStorage` in page), rather than an asynchronous request cache.

Some possible usecases like:

1. store a revision number and use it to check whether the cache is stale;
2. cache submitted data when offline;
3. do adjustment on data from server and cache the result.

A key-value storage can be simulated with Cache, but it would be great if it is provided natively.

-- 
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/981

Received on Saturday, 24 September 2016 10:35:50 UTC