WPCOM_VIP_Cache_Manager::instance PHP Method

instance() public static method

public static instance ( )
    public static function instance()
    {
        static $instance = false;
        if (!$instance) {
            $instance = new WPCOM_VIP_Cache_Manager();
        }
        return $instance;
    }

Usage Example

Esempio n. 1
0
/**
 * Clear the VIP Go edge cache at the URLs associated with a term
 *
 * This includes:
 * * The term archive URL, paged back five pages as default
 * * The term feed
 *
 * You can filter how many of the pages of the archives are cleared
 * using the `wpcom_vip_cache_purge_urls_max_pages` filter.
 *
 * @param object|int $term Either the WP Term object, or the term_id
 *
 * @return bool True on success
 */
function wpcom_vip_purge_edge_cache_for_term($term)
{
    return WPCOM_VIP_Cache_Manager::instance()->queue_term_purge($term);
}
All Usage Examples Of WPCOM_VIP_Cache_Manager::instance