Clearing cache in development enviroment

Last post 05-14-2008 4:13 AM by srajanlad. 8 replies.

Sort Posts:

  • Clearing cache in development enviroment

    12-28-2007, 11:41 AM
    • Loading...
    • chopswil15
    • Joined on 12-27-2007, 6:57 PM
    • Posts 5

    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.

  • Re: Clearing cache in development enviroment

    12-28-2007, 11:51 AM

    hi chopswil15 ,

    you can use Cache.Flush() ;

    to remove entire data from  cache..

     Hope this helps you

     

     

     

     

     

    Regards

    Suresh Kumar G

     

     

     

     

     

     

     

  • Re: Clearing cache in development enviroment

    12-28-2007, 11:54 AM
    • Loading...
    • pradeep7n
    • Joined on 10-24-2007, 2:07 AM
    • Coimbatore, India
    • Posts 202

    Hope you could use this  Cache.Remove(sCacheName) -- to remove specific

    Also You could use Cache.Flush to clear all cache 

    Please remember to click "Mark as Answer" on this post if it helped you.
    Happy Coding Yes
    Pradeep
  • Re: Clearing cache in development enviroment

    12-28-2007, 12:07 PM
    • Loading...
    • chopswil15
    • Joined on 12-27-2007, 6:57 PM
    • Posts 5

    I'm not seeing the Flush method.

    I'm using

    System.Web.HttpRuntime.Cache

  • Re: Clearing cache in development enviroment

    12-28-2007, 12:13 PM

     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

     

     

    Shah Dharnendra G
    Analyst Programmer,
    GTL-Ahmedabad
  • Re: Clearing cache in development enviroment

    12-28-2007, 12:15 PM
    • Loading...
    • chopswil15
    • Joined on 12-27-2007, 6:57 PM
    • Posts 5

    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. 

  • Re: Clearing cache in development enviroment

    12-28-2007, 12:18 PM

    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. 

    Shah Dharnendra G
    Analyst Programmer,
    GTL-Ahmedabad
  • Re: Clearing cache in development enviroment

    12-28-2007, 4:34 PM
    Answer
    • Loading...
    • anas
    • Joined on 09-21-2006, 4:31 AM
    • Jerusalem
    • Posts 3,863

    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.

     

     

     

    Best Regards,

    Anas Ghanem| LogFile
  • Re: Clearing cache in development enviroment

    05-14-2008, 4:13 AM
    • Loading...
    • srajanlad
    • Joined on 05-14-2008, 4:09 AM
    • Posts 1

    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? 

     

Page 1 of 1 (9 items)