diff --git a/CHANGELOG.md b/CHANGELOG.md index ed376dd7..818e3b9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ This is an alpha version! The changes listed here are not final. ### Fixed - Caching: make sure there is cache content to serve, even if the cache file was found +- Ensure homepage cache gets flushed when a post is unpublished. - Lossless image optimization for images (should improve performance with no visible changes). - Move trailing space out of i18n message. - Revert recent SVG image optimizations. diff --git a/wp-cache-phase2.php b/wp-cache-phase2.php index adddbe6c..73d5533a 100644 --- a/wp-cache-phase2.php +++ b/wp-cache-phase2.php @@ -3192,6 +3192,7 @@ function wpsc_post_transition( $new_status, $old_status, $post ) { } list( $permalink, $post_name ) = get_sample_permalink( $post ); $post_url = str_replace( array( '%postname%', '%pagename%' ), $post->post_name, $permalink ); + wp_cache_post_edit( $post->ID ); } elseif ( $old_status !== 'publish' && $new_status === 'publish' ) { // post published wp_cache_post_edit( $post->ID ); return;