Recently, I had an idea for a new CSModule that would make it so that comments to blog posts would show up immediately after being posted, instead of having to wait for the cache to be cleared. As such, my new ClearCommentCache module was born.
This module does not prevent the caching of comments in any way. It simply waits for a new comment or trackback to made, and after it is submitted, it will clear the current cache of modules, so that on the next request, it will go to the database and get a fresh list.
A few other little things it does includes:
- Will only clear the cache when the comment passes spam filters
- Will allow you to configure it to clear the cache across all posts, or only certain posts
- Use a [ ClearCommentCache ] text part (no spaces around the [ ]) will cause the cache to be cleared on new comments for that particular post. It will also strip the text part from the message so it doesn't show.
Yes, the module is being used on this post (though only this post, not across my whole site).
Download (Requires Community Server v2.1)