Sign in | Join
Last post 05-14-2008 4:13 AM by srajanlad. 8 replies.
Sort Posts: Oldest to newest Newest to oldest
ASP.Net 2.0
How a I completely clear out the cache when I'm running code in the devleopemnt enviroment on my local machine?
I'm adding to the cache, httpruntime.cache.add, and between runs I need to make such everything is cleared out.
Thanks.
hi chopswil15 ,
you can use Cache.Flush() ;
to remove entire data from cache..
Hope this helps you
Regards
Suresh Kumar G
Hope you could use this Cache.Remove(sCacheName) -- to remove specific
Also You could use Cache.Flush to clear all cache
I'm not seeing the Flush method.
System.Web.
You can maintain cache clear by adding following setting on IIS server.
IIS>> your Virtual Directory >> Properties >> HTTP Header.
Add following things:
cache-control:no-cache
pragma:no-cache
expires:0
what about in my devleopment environment?
I need caching enabled when I'm testing on my IDE but I need to ensure that the cache is empty between runs.
You can define the above values in Meta Tags of Master page.It have the same effect for the pages who inherit from master page.
chopswil15:what about in my devleopment environment? I need caching enabled when I'm testing on my IDE but I need to ensure that the cache is empty between runs.
the cache will be cleared only if you stop the development server ,
in the TaskBar, right click on ASP.net development server ,and click close.
I am using vs2005(Os vista)
when I close the ASP.Net development server from the task bar
the cache is not flushed?
any settings we need to change?