Support » Plugins and Hacks » Quick Cache (Speed Without Compromise) » [Plugin: Quick Cache ( Speed Without Compromise )] wp_update_post() doesn't purge post cache
4 years, 9 months ago
I use wp_update_post() in my theme which triggers save_post action.
I have “Single + Front Page” purging set in my cache settings, but it doesn’t work with this function.
Is there any way to manually clear specific cache using theme functions?
I found a solution:
1. Edit plugins/quick-cache/includes/classesclearing-routines.inc.php
2. Find and comment out this conditional check (lines 34,35,122):
//if (is_blog_admin () && in_array ($pagenow, ($pages = array ("edit.php", "post.php", "post-new.php"))))
Cache clearing now works whenever you call save_post (for example by using wp_update_post()), so you don’t have to use admin post editor.