Recent

crp_related_cache_clear_batch_limitfilter

Filters the number of posts saved in a single request above which the related posts’ caches are not cleared one by one.

Past this point the whole cache is stale anyway — an import leaves every existing post’s related posts computed without the imported candidates — so a single debounced flush is both cheaper and more correct than thousands of individual queries. Set to 0 to never escalate.

Type: filter
Since: 4.5.0
Source: includes/util/class-cache.php line 157

Parameters

Type Name Description
int $batch_limit Number of posts. Default 20.

Usage

add_filter( 'crp_related_cache_clear_batch_limit', function($batch_limit) {
    // ...
    return $batch_limit;
} );