Request Caching

Request caching enables you to cache any object or data across multiple requests. The cached items have the same scope as application state variables. This powerful and easy-to-use caching technology provides the capability of storing expensive objects in memory across HTTP requests. (Note that expensive means a heavy processing load or time-intensive processes.)

The request caching mechanism is implemented by the Cache class, which creates instances of itself that are private to each running application on a web server. As such, the cache has a lifetime equal to the time the application is running, which is exactly what application state variables do.

Each time an ASP.NET web application is restarted, the cache is cleared and ...

Get Inside ASP.NET now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.