You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the cache storage is mainly useful to store into a cache a response that matches somehow a request. So if you have a request already cached a very similar request can be found in the cache. It's fine but sometimes, it's just not enough to be very useful.
Currently, the only way you can query the cache storage is by fetching the keys and passing them through a custom router that would allow you to find a key that matches your criteria. The other way which might be a bit easier is to implement a custom database storage in an IndexedDB with the indexes that you need to search on.
For example, let say you had such url: /store/templates/xml/1?bundle=bundle1
Think of it like a xml template of version 1 and taking a bundle from this template called bundle1.
Basically, the query could try to find a bundle of the most recent version that is in the cache. So a search on:
Then simply the index by taking a value from it using a key or range and possibly add a way to change the order in which the keys of the index are stored.
cache.index('templates').search(['bundle1']) // gets all bundle1 regardless of the version
cache.index('templates').search(['bundle1'], ['bundle1', 10]) // gets all bundle with a version less than 10.
The text was updated successfully, but these errors were encountered:
Currently, the cache storage is mainly useful to store into a cache a response that matches somehow a request. So if you have a request already cached a very similar request can be found in the cache. It's fine but sometimes, it's just not enough to be very useful.
Currently, the only way you can query the cache storage is by fetching the keys and passing them through a custom router that would allow you to find a key that matches your criteria. The other way which might be a bit easier is to implement a custom database storage in an IndexedDB with the indexes that you need to search on.
For example, let say you had such url:
/store/templates/xml/1?bundle=bundle1
Think of it like a xml template of version 1 and taking a bundle from this template called bundle1.
Basically, the query could try to find a bundle of the most recent version that is in the cache. So a search on:
It would be nice if we could query the storage with something like a range or exact match.
Or possibly allow a way to create indexes that can be queried.
Then simply the index by taking a value from it using a key or range and possibly add a way to change the order in which the keys of the index are stored.
The text was updated successfully, but these errors were encountered: