Свойство | Type | Description | |
---|---|---|---|
$cache_control | boolean | Set false to disable Last-Modified and Cache-Control headers | |
$cache_redirects | boolean | Set true to enable redirect caching. | |
$cancel | boolean | Change this to cancel the output buffer. Use wp_output_cache_cancel(); | |
$debug | boolean | Set false to hide the spider_cache info | |
$group | string | Name of cache group. You can simulate a cache flush by changing this. | |
$headers | array | These will be sent with every response from the cache. | |
$max_age | integer | Maximum age of a cached page in seconds | |
$noskip_cookies | array | Names of cookies - if they exist and the cache would normally be bypassed, don't bypass it. | |
$redirect_location | boolean | This is set to the redirect location. | |
$redirect_status | boolean | This is set to the response code during a redirect. | |
$remote | boolean | False disables sending buffers to remote datacenters | |
$seconds | integer | ...in this many seconds (zero to ignore this and use spider_cache immediately) | |
$skip_cookies | array | Names of cookies - if they exist bypass caching. | |
$started | integer | The timestamp when the object was created | |
$times | integer | .. (two or more) | |
$uncached_headers | array | These headers will never be cached. Apply strtolower. | |
$unique | array | If you conditionally serve different content, put the variable values here. | |
$vary | array | Array of functions for create_function. The return value is added to $unique above. |
Méthode | Description | |
---|---|---|
__construct ( ) | Main spider_cache constructor | |
redirect_status ( string $status, string $location ) : type | Set the redirect status, and whether it should be cached | |
status_header ( string $status_header, integer $status_code = 200 ) : string | Set the status header & code |
Méthode | Description | |
---|---|---|
add_debug_from_cache ( ) | Add verbose debug info | |
add_debug_html_to_output ( string $debug_html = '' ) : void | Determine where to put what debug output | |
add_debug_just_cached ( ) | Add some debug info | |
add_variant ( string $function = '' ) | Add a variant to the cache key | |
configure_groups ( ) | Configure the cache client | |
do_headers ( array $headers1, array $headers2 = [] ) | Merge the headers and send them off | |
do_variants ( type $dimensions = false ) | Set the cache with it's variant keys | |
generate_keys ( ) | Generate cache keys for the request | |
ob ( string $output = '' ) : string | Start the output buffer | |
start ( ) : void | Start page caching and hook into requests to complete it later |
Méthode | Description | |
---|---|---|
has_cookies ( ) : boolean | Return whether or not user related cookies have been detected | |
is_ssl ( ) : boolean | Determine if SSL is used | |
set_skip_cookies ( ) | Look for predefined constants, and add them to the skip_cookies array | |
timer_stop ( $display = true, $precision = 3 ) | Defined here because timer_stop() calls number_format_i18n() |
protected add_debug_html_to_output ( string $debug_html = '' ) : void | ||
$debug_html | string | |
Résultat | void |
protected add_variant ( string $function = '' ) | ||
$function | string |
protected do_headers ( array $headers1, array $headers2 = [] ) | ||
$headers1 | array | |
$headers2 | array |
protected do_variants ( type $dimensions = false ) | ||
$dimensions | type |
public redirect_status ( string $status, string $location ) : type | ||
$status | string | |
$location | string | |
Résultat | type |
public bool $cache_control | ||
Résultat | boolean |
public bool $cache_redirects | ||
Résultat | boolean |
public bool $cancel | ||
Résultat | boolean |
public bool $debug | ||
Résultat | boolean |
public string $group | ||
Résultat | string |
public array $headers | ||
Résultat | array |
public int $max_age | ||
Résultat | integer |
public array $noskip_cookies | ||
Résultat | array |
public bool $redirect_location | ||
Résultat | boolean |
public bool $redirect_status | ||
Résultat | boolean |
public bool $remote | ||
Résultat | boolean |
public int $seconds | ||
Résultat | integer |
public array $skip_cookies | ||
Résultat | array |
public int $started | ||
Résultat | integer |
public array $uncached_headers | ||
Résultat | array |
public array $unique | ||
Résultat | array |
public array $vary | ||
Résultat | array |