Title: Clear post cache after comment
Last modified: November 11, 2018

---

# Clear post cache after comment

 *  Resolved [Michael](https://wordpress.org/support/users/bazzarello/)
 * (@bazzarello)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/)
 * Hello,
 * Is it possible to clear the cache of a post as soon as there is a new comment?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10873606)
 * It is already build in, but to be honest, I´m using the pro version. Isn´t it
   working for you?
 *  Thread Starter [Michael](https://wordpress.org/support/users/bazzarello/)
 * (@bazzarello)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10873973)
 * Hi [@fredawd](https://wordpress.org/support/users/fredawd/)
 * The cache is being replaced. But while a new cache of that page is created, the
   old one is still being displayed (without the comments).
 * It would be interesting to delete the cache immediately while you are building
   a new cache. So whoever accesses the page at the same time can see the new comment
   and not after a few minutes.
 * Is this an option only in the PRO version?
 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10879679)
 * Hi,
    It should work immediately. Maybe some misconfiguration somewhere? Are you
   sure everything is configured right in WordPress Discussion Settings?
 *  Thread Starter [Michael](https://wordpress.org/support/users/bazzarello/)
 * (@bazzarello)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10880923)
 * Thanks for the feedback [@fredawd](https://wordpress.org/support/users/fredawd/)!
 * Yes, I checked here and everything is ok. I am using the wpDiscuz plugin to manage
   the comments, the only cache it creates is about the avatars images, but I disabled
   this option because I did not use Gravatar.
 * To comment the user needs to login. So when commenting on a certain page the 
   comment already appears to him. But if it logout and access the page again, the
   comment will only appear when you have finished re-creating the page’s cache.
 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10884139)
 * You could try to Enable Caching for logged in users, but you need to monitor 
   if that works for you, as it can also break things.
 *  Thread Starter [Michael](https://wordpress.org/support/users/bazzarello/)
 * (@bazzarello)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10884721)
 * Yes, I already tested the 2 options. Enabled and disabled the cache for logged
   in users. It is currently enabled and working very well. The only problem is 
   in the question that I said, instead of the page being “deleted” it is “replaced”.
   That is, instead of deleting the cache of the page that received comment, the
   old cache is displayed until the current cache is created.
 *  Plugin Contributor [Fred](https://wordpress.org/support/users/fredawd/)
 * (@fredawd)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10909804)
 * I did some tests and you are right. It seems to be a conflict with wpDiscuz plugin,
   which prevents to clear cache when a new comment is added.
 * I will put a request in for a fix. Thank you for your feedback!
 *  Thread Starter [Michael](https://wordpress.org/support/users/bazzarello/)
 * (@bazzarello)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10913477)
 * Thank you very much!!! And congratulations to the plugin and the support!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Clear post cache after comment’ is closed to new replies.

 * ![](https://ps.w.org/swift-performance-lite/assets/icon-256x256.jpg?rev=2388229)
 * [Swift Performance Lite](https://wordpress.org/plugins/swift-performance-lite/)
 * [Support Threads](https://wordpress.org/support/plugin/swift-performance-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/swift-performance-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/swift-performance-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/swift-performance-lite/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/bazzarello/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/clear-post-cache-after-comment/#post-10913477)
 * Status: resolved