I have an ASP.Net 4.0 web application which very frequently loads data from the database and does heavy calculations on it. I want to cache this loaded and prepared data in a central cache that can be accessed by every user and computer who uses the application.
Simple use-case:
- User 1 accesses webpage, cache is empty, data is loaded/calculated, data is cached
- User 2 accesses webpage, cache contains data, data loaded from cache
- User 3 accesses webpage, cache contains data, data loaded from cache
- User 1 reloads webpage, cache contains data, data loaded from cache
- Cache expires
- User 3 refreshes webpage, cache is empty, data is loaded/calculated, data is cached
I know that ASP.Net has a built-in cache mechanism. What I don't know is whether it can be shared between different users accessing the site on different computer at the same time. I would also like to know how the system behaves in a web farm environment.