Title: Cache flushing necessary?
Last modified: February 19, 2025

---

# Cache flushing necessary?

 *  Resolved [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/cache-flushing-necessary/)
 * Hello,
   I have a small problem that whenever I post a new post, the query loops
   that return a list of posts and should also include this one seem to be cached
   and do not return the newest post.
 * After a cache flush the query loops also return the new post. Can I somehow set
   up a cache flush whenever a new post is published?
 * And is there anything important that one needs to pay attention to when configuring
   this plugin?
   With that I mean things like when using static html cache, do not
   cache any pages where information is output based on the current logged in user.
   Is there anything similar that I need to pay attention to?

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

 *  Plugin Author [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/cache-flushing-necessary/#post-18322474)
 * Thanks for the question!
 * If the object cache needs flushing after updating a post there’s a problem somewhere
   in other code. Is it possible you are working with a custom post type or something
   like that?
 * The object cache is designed (by the core team) to be zero-config. It is far 
   closer to that than page caches are.
 * You can certainly do `wp_cache_flush()` from a handler for the `wp_after_insert_post`
   action. But that will trash any transients you have created; it’s a pretty big
   hammer to use.
 * If you have any further details I’ll be happy to investigate.
 *  Plugin Author [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/cache-flushing-necessary/#post-18355010)
 * There was a regression (something I broke by mistake that used to to work) in
   version 1.5.1 that may have caused your problem. Please give 1.5.3 a try.
 *  Thread Starter [Benedikt Ledl](https://wordpress.org/support/users/benniledl/)
 * (@benniledl)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/cache-flushing-necessary/#post-18360553)
 * Thank you for the follow up, it seems to work now! Thank you so much!
 *  Plugin Author [OllieJones](https://wordpress.org/support/users/olliejones/)
 * (@olliejones)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/cache-flushing-necessary/#post-18361714)
 * Glad to hear it. Thanks for your patience.

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

The topic ‘Cache flushing necessary?’ is closed to new replies.

 * ![](https://ps.w.org/sqlite-object-cache/assets/icon-128x128.jpg?rev=2829632)
 * [SQLite Object Cache](https://wordpress.org/plugins/sqlite-object-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sqlite-object-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sqlite-object-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/sqlite-object-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sqlite-object-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sqlite-object-cache/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [OllieJones](https://wordpress.org/support/users/olliejones/)
 * Last activity: [1 year, 2 months ago](https://wordpress.org/support/topic/cache-flushing-necessary/#post-18361714)
 * Status: resolved