Reputation: 5896
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
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