A bust cache method
intercepted16 opened this issue · 2 comments
intercepted16 commented
It would be beneficial to introduce a reset (or cache busting) feature to the Svelte store. This feature would provide a 'bust' method on the store that, when invoked, effectively reevaluates the initial store value provided. This is particularly useful when the initial store value is an awaited Promise, a function call, or similar dynamic content, but not for static values like arrays or objects.
Currently, I am using a workaround involving an additional store that holds a boolean value. This store is subscribed to, and when its value is set to true, the main store value is "reset." However, this approach is neither as clean nor as efficient as having a dedicated 'bust' method.
joshnuss commented
intercepted16 commented