or Cache...">

Does ASP.NET store cache memory on server or browser

in ASP.NET if I use:

$<%@OutputCache Duration="3" VaryByParam="*" %>



Cache.Insert("Names", mydataset);


Does this keep the cache in the browser or on the server? I know these are two different caching methods, and there are probably a few more, but I am trying to figure out when the cache is stored in the client's browser or on the server, and where can I find the pros and cons between the cache store on either one.


source to share

2 answers


<%@OutputCache Duration="3" VaryByParam="*" %>


Can be cached both on the server and on the client, because by default the Location

directive value OutputCache

is Any

. See here for reference.

Now this:

Cache.Insert("Names", mydataset);


Will be cached on the server side into the application cache.



This is stored on the server. The output cache stores the html output after the page has been processed, so the server doesn't need to recycle the page over and over unnecessarily.

More details: http://www.4guysfromrolla.com/articles/022802-1.aspx



All Articles