Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does my ASP.NET cache store on server or browser

in ASP.NET, If I use:

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

or

Cache.Insert("Names", mydataset);

Does this store the cache on the browser or the server? I know they're two different methods for caching and there are probably several more but I'm trying to find out when the cache is stored on the client browser or on the server and where can I find the pros and cons between cache being store on either of them.

like image 849
mjroodt Avatar asked Dec 03 '25 09:12

mjroodt


1 Answers

This:

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

May be cached at both, the server or the client because by default the Location value of the OutputCache directive is Any. See here for reference.

Now, this:

Cache.Insert("Names", mydataset);

Will be cached on the server side in the application Cache.

like image 138
Icarus Avatar answered Dec 05 '25 23:12

Icarus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!