I would like to understand how caching actually works.
So, for example I have lookup to show list of Customer. I understand that when I get list first time it becomes cached and next request will bring it from cache.
What if user goes and modifies Customers from different place. For now let's say Customer can be modified using different EntityManager. How do I handle this with cache? How to coordinate updates?
What if Customers changed by some server-side operation not related to my app. How to deal with this scenario?
I guess my question is more about business practices. I understand there is no magic and I need to refresh cache. But I wonder how people do it. Do I setup expiration for cached entities? Or do I let user refresh data if they don't see/find what they need?
In two words what is the business case and how would I use it?