Filter: DevOwl/CacheInvalidate/Custom

apply_filters( 'DevOwl/CacheInvalidate/Custom', $result ) → {array}

The cache invalidation took place, clear also a custom cache implemented through this filter. To make this filter work and mark the cache as "active" you also need to make use of the DevOwl/CacheInvalidate/Custom/Label filter.

Parameters:
Name Type Description
$result array
Returns:
Type
array
Example

Clear a remote cache

<?php
add_filter( 'DevOwl/CacheInvalidate/Custom', function ( $result )  {
    $result['my-custom-cache'] = wp_remote_get('https://example.com/purgeall');
    return $result;
});

add_filter( 'DevOwl/CacheInvalidate/Custom/Label', function ( $labels )  {
    $labels[] = 'My custom cache';
    return $labels;
});