This came to mind in reference to how Cache currently works. It does the trick, but, how you load/reference a cache matters (you can get multiple instances of the same cache in memory, effectively defeating their purpose).
For the majority of use cases, having a single global store in memory makes sense. The proposal would be to have two options:
Use the globalState cache (provided for you by Joystick as a default).
Create your own cache using Cache just like you would today.
The 2nd option would be reserved for rare use cases where you couldn't/shouldn't mix data in a single store.
This came to mind in reference to how Cache currently works. It does the trick, but, how you load/reference a cache matters (you can get multiple instances of the same cache in memory, effectively defeating their purpose).
For the majority of use cases, having a single global store in memory makes sense. The proposal would be to have two options:
The 2nd option would be reserved for rare use cases where you couldn't/shouldn't mix data in a single store.