02 December 2013
If you are using BlogEngine.NET on your blog site, you might have experienced this similar situation when you add a new entry or edit an old post, that it doesn't show the update right away. Instead, it displays the updated posts after a few hours. This happens even after you clear the browser cache or change to different browsers.
This is due to the fact that BlogEngine.NET stores data in server cache to improve page load and website performance so you can get instance response when you access the website. This is an awesome technique, but we can find a little workaround so we can clear the cache everytime we add/edit blog post.
The following code will modify the Date Modified value of the web.config file, which will clear out everything cached in memory.
string ConfigPath = HttpContext.Current.Request.PhysicalApplicationPath + "\\web.config";
About Site by Tommy
Freelance web design and developer in Jakarta and Microsoft Certified Professional with five years of experience in web design and development, application development, database system, Search Engine Optimization (SEO), graphic design, logo design, business cards, corporate letterhead, posters/banners, brochures and flyers, social media marketing, and email marketing/campaign.