Hi there all!
I’m hoping, someone can help me with my custom code. I want to disable the automatic-cache-clearing when a post from a specific posttype (called „anfrage“) is created.
My code from the mu-plugin is now like:
add_filter('comet_cache_disable_auto_clear_cache_routines', 'disable_on_anfrage', 10, 0);
function disable_on_anfrage($query) {
if ( ( !is_array( $query->query_vars['post_type'] ) && $query->query_vars['post_type'] == 'anfragen' ) ||
( is_array( $query->query_vars ) && in_array( 'anfragen', $query->query_vars ) ) ) {
return TRUE;
}
}
I’m afraid, I’m on the wrong way. Now it seems, that all of the auto-clear-performance is disabled. Please for help!
Thanks in advance! Diana