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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.