Title: clean_post_cache hook
Last modified: April 22, 2023

---

# clean_post_cache hook

 *  Resolved [Alexander Guskov](https://wordpress.org/support/users/forcesail/)
 * (@forcesail)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/clean_post_cache-hook/)
 * Why wouldn’t you process clean_post_cache hook? 
   It would re-cache posts/pages
   when some injecting into them blocks (through shortcodes) are changed.

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

 *  Thread Starter [Alexander Guskov](https://wordpress.org/support/users/forcesail/)
 * (@forcesail)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/clean_post_cache-hook/#post-16681086)
 * And clean_user_cache hook as well. please.
 * I temporary added:
   add_action(‘clean_user_cache’, array($this, ‘purge_user_on_update’),
   10, 1); add_action(‘clean_post_cache’, array($this, ‘purge_post_on_update’), 
   10, 1); add_action(‘clean_post_cache’, array($this, ‘purge_archive_pages_on_post_update’),
   10, 1);public function purge_user_on_update( $user_id ) {WPO_Page_Cache::delete_cache_by_url(
   get_author_posts_url($user_id), true); } to the file class-wpo-cache-rules.php
   instead of:add_action(‘save_post’, array($this, ‘purge_post_on_update’), 10, 
   1);add_action(‘save_post’, array($this, ‘purge_archive_pages_on_post_update’),
   10, 1);and can confirme that all works perfectly.
 * But it would be perfect if it found it’s place in the oficial release, please.
 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [3 years ago](https://wordpress.org/support/topic/clean_post_cache-hook/#post-16682613)
 * Hi Alexander,
 * I have added a ticket to our internal development board.
 *  Thread Starter [Alexander Guskov](https://wordpress.org/support/users/forcesail/)
 * (@forcesail)
 * [3 years ago](https://wordpress.org/support/topic/clean_post_cache-hook/#post-16682699)
 * Thank you. It would be nice to be informed when it’s processed.
 *  Plugin Support [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * (@vupdraft)
 * [3 years ago](https://wordpress.org/support/topic/clean_post_cache-hook/#post-16686073)
 * Hi Alexander,
 * I would advise that you keep an on our change logs and keep the plugin updated.
   We make a large number of fixes and updates with each update so it’s really difficult
   for us to keep track of which users required which fixes.

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

The topic ‘clean_post_cache hook’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [vupdraft](https://wordpress.org/support/users/vupdraft/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/clean_post_cache-hook/#post-16686073)
 * Status: resolved