Persist some parts of the queryCache to localstage
I have a pretty basic shoppinglist app where data is split it ints volatility:
ingredients and recipes change infrequently, while the shoppinglist itself does changes often.
Is it possible to hold the recipes and ingredients in local storage for a long time (e.g 7d) but prevent the shoppinglist from being persisted that long?
Since I didn't see anything obvious in the queryClient or persister, I think the easiest choice is to have 2 queryClients differenty configured, one "long term" and one "short term"? The long term one would have proper localStorage persistence.
Is this advisable? Am I inadvertenly walking into a trap? Any alternatives?
ingredients and recipes change infrequently, while the shoppinglist itself does changes often.
Is it possible to hold the recipes and ingredients in local storage for a long time (e.g 7d) but prevent the shoppinglist from being persisted that long?
Since I didn't see anything obvious in the queryClient or persister, I think the easiest choice is to have 2 queryClients differenty configured, one "long term" and one "short term"? The long term one would have proper localStorage persistence.
Is this advisable? Am I inadvertenly walking into a trap? Any alternatives?