PHP Класс WPCOM_VIP_Cache_Manager, vip-mu-plugins-public

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( )
build_purge_request ( string $url, string $method ) : array Instead of using this method directly, please use the API functions provided; see api.php.
curl_multi ( $requests )
execute_purges ( )
get_manual_purge_link ( )
init ( )
instance ( )
manual_purge_message ( )
purge_site_cache ( $when = null )
queue_old_permalink_purge ( integer $post_ID, WP_Post $post_after, WP_Post $post_before ) : void Schedule purge of old permalink in case it was changed during post update and only if the post's status was publish before the update
queue_post_purge ( $post_id )
queue_purge_url ( string $url ) : boolean PURGE a single URL
queue_term_purge ( object | integer $term ) : boolean Purge the cache for a terms
queue_terms_purges ( array $ids, string $taxonomy ) Purge the cache for some terms

Защищенные методы

Метод Описание
get_purge_urls_for_term ( object $term ) : array Get all URLs to be purged for a given term

Приватные методы

Метод Описание
can_purge_cache ( )

Описание методов

__construct() публичный Метод

public __construct ( )

build_purge_request() публичный Метод

Instead of using this method directly, please use the API functions provided; see api.php.
public build_purge_request ( string $url, string $method ) : array
$url string A URL to PURGE
$method string
Результат array

curl_multi() публичный Метод

public curl_multi ( $requests )

execute_purges() публичный Метод

public execute_purges ( )

get_purge_urls_for_term() защищенный Метод

Get all URLs to be purged for a given term
protected get_purge_urls_for_term ( object $term ) : array
$term object A WP term object
Результат array An array of URLs to be purged

init() публичный Метод

public init ( )

instance() публичный статический Метод

public static instance ( )

manual_purge_message() публичный Метод

purge_site_cache() публичный Метод

public purge_site_cache ( $when = null )

queue_post_purge() публичный Метод

public queue_post_purge ( $post_id )

queue_purge_url() публичный Метод

PURGE a single URL
public queue_purge_url ( string $url ) : boolean
$url string The specific URL to purge the cache for
Результат boolean True on success

queue_term_purge() публичный Метод

Purge the cache for a terms
public queue_term_purge ( object | integer $term ) : boolean
$term object | integer A WP Term object, or a term ID
Результат boolean True on success

queue_terms_purges() публичный Метод

Hooks the clean_term_cache action We do not respect requests to clear caches for the entire taxonomy, as this would be potentially hundreds or thousands of PURGE requests.
public queue_terms_purges ( array $ids, string $taxonomy )
$ids array An array of term IDs.
$taxonomy string Taxonomy slug.