Remove the cache

Topics: ASP.NET 2.0, Business Logic Layer, Controls
Sep 17, 2007 at 10:01 PM
I know this goes against the .net world, but I need to stop the site from caching the posts and comments. I have modified the app to allow for moderated comments (a comment is not visible until it is approved). However, I am running into trouble with the cache. If i approve a comment, it does not show unless the application pool is recycled. I need it to be immediate. Is there any way to force the clearing of the cache programatically or just to remove it all together?
Coordinator
Sep 18, 2007 at 11:43 AM
The next release have comment moderation build in and you can get it by downloading the latest source code. You can clear the cache by calling Post.Posts.Clear()
Sep 18, 2007 at 1:09 PM

madskristensen wrote:
The next release have comment moderation build in and you can get it by downloading the latest source code. You can clear the cache by calling Post.Posts.Clear()


Thank you for your quick reply. I don't mean to be obtuse, but I downloaded the latest source from this CodePlex site (dated Aug 21, 2007) and I do not see anything for comment moderation short of turning comments on and off. When you said that I can get it by downloading the latest source, is there somewhere else I should be going for the latest source? I really need this app to allow people to comment, but their comments won't appear public until I approve them. I hope this is the type of moderation to which you are referring.

By the way, nice job on the app. Very slick.
Coordinator
Sep 18, 2007 at 1:28 PM
You can get the latest source code from here http://www.codeplex.com/blogengine/SourceControl/ListDownloadableCommits.aspx
Sep 18, 2007 at 2:34 PM
Beautiful. Thank you so much. Exactly what I was looking for.