What Exactly Stale data mean ? How can we Handle this in Cache ?
I'm going through Cache and found about stale data. How we can handle it?? How release the stale data if it is not being used? Can someone brief about it ??
Once you store data in a cache, it's like a snapshot of the data. If the data changes, you must flush the cache and reload the data.
Think of it like taking a snapshot of your friends at a sporting event. Once the event is over and your friends leave, the snapshot is 'stale'. It no longer reflects the true status.
Typically, when you know the data has changed, you should flush the cache and let it build back fresh.