Click here to Skip to main content
15,881,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I want to change the setting of limited ASP files in memory and on disk.
It is non editable in IIS 7.5.
I want to know the alternate for these settings.
Posted

Let try this:

Cache page

ASP.NET
<%@ OutputCache Duration="60" Location="Client" VaryByParam="None" %>

Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetCacheability(HttpCacheability.Private);


Defragment cache:

C#
<%@ OutputCache duration="60" varybyparam="City" %>


Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));
Response.Cache.SetCacheability(HttpCacheability.Public);
Response.Cache.VaryByParams["City"] = true;


It is cached based on input parameter
 
Share this answer
 
Comments
Vipin_Arora 22-Aug-13 6:10am    
According to this solution, I have to change the code of every page, but I need to done on IIS level
Let try this for all page.

Web.config
XML
<configuration>
     <location path="showStockPrice.aspx">
       <system.webserver>
         <caching>
           &lt;profiles&gt;
             <add varybyquerystring="*" location="Any" duration="00:00:01" policy="CacheForTimePeriod" extension=".aspx">
           &lt;/profiles&gt;
         </add></caching>
       </system.webserver>
     </location>
</configuration>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900