Skip to content
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

Async Storage Option #21

Open
instantaphex opened this issue Jul 23, 2020 · 5 comments
Open

Async Storage Option #21

instantaphex opened this issue Jul 23, 2020 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@instantaphex
Copy link

#4 I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[x ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

HttpCacheStorage provides a synchronous interface.

Expected behavior

Allow for caching in async storage such as IndexedDB and other async storage options.

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

I'm creating an Ionic/Capacitor application and I would like to be able to use Capacitor storage to work around the 5mb localStorage limit. I'm not able to do this because all of the Storage methods return promises.

Environment

All



@NetanelBasal
Copy link
Member

You're welcome to submit a PR.

@NetanelBasal NetanelBasal added enhancement New feature or request good first issue Good for newcomers labels Jul 23, 2020
@instantaphex
Copy link
Author

Ok great. I don't have time to do it right now, but I'll see if I can dig into it this weekend. Thanks for your work.

@muuvmuuv
Copy link
Contributor

Ah well, I need this too. @instantaphex did you had some time digging into it?

@fasidOnGit
Copy link
Contributor

I am willing to work on this. @NetanelBasal Do you have any specific approach in mind for this ?

IIUC, We need a totally new provider something like HttpCacheStorageAsync which should be extendable just like HttpCacheStorage but asyncified. 🤔

If you have any tips on where to look or what approach to take please shoot it :)

@DavidWiesner
Copy link

DavidWiesner commented Jan 19, 2023

There is the native Cache Web API wich perfectly match the issue description. In advance you can use different Caches from the CachStorage to provide versioning support. (Just in advance if anybody tries to implement this with the Cache API. There is an known performance issue in chrome when using cache.match with option ignoreSearch=true )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants