Currently component instances are flushed and shut down, but we may benefit from keeping instances alive because the state won't have to load again. Some things to consider:
- There's a budget for what we can keep in memory
- If we keep a component in memory for too long, it can become stale
For the first bullet, we can write some algorithm that prioritizes keeping large & frequently-accessed components in memory.
For the second bullet, we can check our version against the latest version in Redis, and if the component is stale, we can refresh it.
Currently component instances are flushed and shut down, but we may benefit from keeping instances alive because the state won't have to load again. Some things to consider:
For the first bullet, we can write some algorithm that prioritizes keeping large & frequently-accessed components in memory.
For the second bullet, we can check our version against the latest version in Redis, and if the component is stale, we can refresh it.