Open selfagency opened 4 years ago
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.
Thanks!
IndexedDB has a 50mb limit, for what it's worth.
Indeed, I’ll need to find a good way to keep a Vuex store (or at least a slice of one) synced up with whatever browser storage engine I use. I’ve done it successfully with regular ol’ localStorage but I’ve never tried with IndexedDB. I’ll certainly look into it! On May 5, 2020, 2:01 PM -0400, Daniel Sieradski notifications@github.com, wrote:
Thanks! IndexedDB has a 50mb limit, for what it's worth. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Use vuex-persist with localforage.
Yeah that seems like the best option from my cursory research as well 👌🏻 On May 5, 2020, 2:13 PM -0400, Daniel Sieradski notifications@github.com, wrote:
Use vuex-persist with localforage. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
I actually use that configuration regularly in my own frontend projects
@selfagency Good to know, I may bother you if I have any questions 😄
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!