Cache is completely cleared on any admin post update
-
It seems that editing or creating any post completely clears the supercache cache. Noticed this on a site with 15,000+ posts. Time to clear the cache is long enough that editors are getting browser timeouts. Also during work hours the cache never grows because any edit to any of the thousands of posts clears the world.
It looks like the issue is somewhere in wp-cache-phase2.php around line 1119.
if ( isset( $wp_cache_refresh_single_only ) && $wp_cache_refresh_single_only && ( strpos( $_SERVER[ 'HTTP_REFERER' ], 'edit-comments.php' ) || strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-comments-post.php' ) ) ) { if ( defined( 'DONOTDELETECACHE' ) ) { if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "wp_cache_post_change: comment detected and it's moderated or spam. Not deleting cached files.", 4 ); return $post_id; } else { if ( isset( $GLOBALS[ 'wp_super_cache_debug' ] ) && $GLOBALS[ 'wp_super_cache_debug' ] ) wp_cache_debug( "wp_cache_post_change: comment detected. only deleting post page.", 4 ); $all = false; } } else { $all = true; }
If the logic in this block is adjusted to allow $all to return false under the correct circumstances only the changed page will be pruned.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Cache is completely cleared on any admin post update’ is closed to new replies.