Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is cached information stored in ASP.NET?

I am developing a website and I want to implement caching to improve its performance.

If I use

<@ OutputCache Duration="20" VaryByParam="None"> 

where will my page be stored? On the client side or on the server? If it's stored on the client side, where is it stored?

Can I cache a master page?

like image 839
PrateekSaluja Avatar asked Nov 13 '10 12:11

PrateekSaluja


People also ask

Where is cached data stored?

Cached data is stored temporarily in an accessible storage media that's local to the cache client and separate from the main storage. Cache is commonly used by the central processing unit (CPU), applications, web browsers and operating systems.

What is cache memory in C#?

In that, we are used to two parameters. The first parameter is used. CacheItem means the added an entry for a cache. it's a key and value parameter so whenever we have any entry to the cache then we initialize this and set the data. Here is an example of how we have added data in the cache item object.


1 Answers

If you don't specify a location, the Output Cache directive will at least store it on the server. It also allows (via headers) intermediate proxies and clients to cache if they choose to.*

It's up to the consuming client to a) choose whether to respect the cache header and b) where to cache. For most browsers it's usually in "Temporary Internet Files" or some equivalent.

*It's more of a "suggestion" that proxies or clients cache, since either way it's ultimately up to them.

like image 170
Rex M Avatar answered Oct 07 '22 20:10

Rex M