Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

complete cache is deleted

$
0
0

Replies: 0

after the update to version 1.6.0 the complete cache is deleted as soon as a post is published. the option for this is not active. i have the following hooks active

function clear_pagination_cache_on_publish_post() {
    if ( class_exists( 'Cache_Enabler' ) ) {
        Cache_Enabler::clear_page_cache_by_url( get_home_url() );
        Cache_Enabler::clear_page_cache_by_url( 'https://www.site.de/page/', 'dir' );
        Cache_Enabler::clear_page_cache_by_url( 'https://www.site.de/ticker/', 'dir' );
        Cache_Enabler::clear_page_cache_by_url( 'https://www.site.de/ticker/' );
    }
}

add_action( 'publish_shortnews', 'clear_pagination_cache_on_publish_post', 10, 2 );
add_action( 'publish_post', 'clear_pagination_cache_on_publish_post', 10, 2 );

function clear_post_cache_on_edit_post() {
    if ( class_exists( 'Cache_Enabler' ) ) {
        Cache_Enabler::clear_page_cache_by_url( get_permalink(), 'dir' );
    }
}

add_action( 'edit_shortnews', 'clear_post_cache_on_edit_post', 10, 2 );
add_action( 'edit_post', 'clear_post_cache_on_edit_post', 10, 2 );

With version 1.5.5 everything worked as it should.

any idea?


Viewing all articles
Browse latest Browse all 59525

Trending Articles