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

[Feature Request] Keep data in localstorage or indexeddb #310

Open
selfagency opened this issue May 5, 2020 · 7 comments
Open

[Feature Request] Keep data in localstorage or indexeddb #310

selfagency opened this issue May 5, 2020 · 7 comments

Comments

@selfagency
Copy link
Contributor

Hello again,

I remain a big fan of Astral after all these years. But it's a genuine pain in the ass to have to wait for all my stars to reload every time I open the app. This could be remedied by storing data in localstorage/indexeddb/etc. and pinging for updates to the user's stars, rather than reloading them every time the page is loaded.

Please consider in a future update!

@syropian
Copy link
Member

syropian commented May 5, 2020

Stars are actually cached for 2 hours at a time, bit I agree that a more persistent solution would be nice. I've toyed with using localstorage before, and though there were some minor issues it worked pretty well, but it just never shipped. My only concern is hitting size limits (localstorage is around 10mb I think?). I know there are some users who have upwards of 6,000 stars and I'm worried that amount of data would not be able to persist by itself.

With that being said, that is a solvable problem, by possibly setting a sensible limit to the number of stars stored in localstorage, so it's not off the table by any means. I'll try and take a crack at this over the next few weeks.

@selfagency
Copy link
Contributor Author

Thanks!

IndexedDB has a 50mb limit, for what it's worth.

@syropian
Copy link
Member

syropian commented May 5, 2020 via email

@selfagency
Copy link
Contributor Author

Use vuex-persist with localforage.

@syropian
Copy link
Member

syropian commented May 5, 2020 via email

@selfagency
Copy link
Contributor Author

I actually use that configuration regularly in my own frontend projects

@syropian
Copy link
Member

syropian commented May 5, 2020

@selfagency Good to know, I may bother you if I have any questions 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants