steventnorris
steventnorris

Reputation: 5896

ASP.NET Caching for all users

I'm wanting to cache some data in ASP.NET so that once a single cache is made, it is accesible to all users. Will HttpContext.Current.Cache do that, or is there another context's cache I need to be accessing?

Upvotes: 2

Views: 784

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038810

Will HttpContext.Current.Cache do that

Yes, that's exactly what it is designed for: store data that will be available to all users of the application. You may also take a look at the @OutputCache directive which allows you to cache entire WebForms (aspx) or fragments (ascx) on the server or on the client contrary to HttpContext.Current.Cache which stores objects onto the server.

Upvotes: 6

Related Questions