PHP Class WPCOM_VIP_Cache_Manager, vip-mu-plugins-public

Afficher le fichier Open project: Automattic/vip-mu-plugins-public Class Usage Examples

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
get_purge_urls_for_term ( object $term ) : array Get all URLs to be purged for a given term

Private Methods

Méthode Description
can_purge_cache ( )

Method Details

__construct() public méthode

public __construct ( )

build_purge_request() public méthode

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
Résultat array

curl_multi() public méthode

public curl_multi ( $requests )

execute_purges() public méthode

public execute_purges ( )

get_purge_urls_for_term() protected méthode

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
Résultat array An array of URLs to be purged

init() public méthode

public init ( )

instance() public static méthode

public static instance ( )

manual_purge_message() public méthode

purge_site_cache() public méthode

public purge_site_cache ( $when = null )

queue_post_purge() public méthode

public queue_post_purge ( $post_id )

queue_purge_url() public méthode

PURGE a single URL
public queue_purge_url ( string $url ) : boolean
$url string The specific URL to purge the cache for
Résultat boolean True on success

queue_term_purge() public méthode

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
Résultat boolean True on success

queue_terms_purges() public méthode

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.