Свойство | Тип | Описание | |
---|---|---|---|
$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. |
Метод | Описание | |
---|---|---|
__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 |
Метод | Описание | |
---|---|---|
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 |
Метод | Описание | |
---|---|---|
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 | |
Результат | 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 | |
Результат | type |
public bool $cache_control | ||
Результат | boolean |
public bool $cache_redirects | ||
Результат | boolean |
public bool $cancel | ||
Результат | boolean |
public bool $debug | ||
Результат | boolean |
public string $group | ||
Результат | string |
public array $headers | ||
Результат | array |
public int $max_age | ||
Результат | integer |
public array $noskip_cookies | ||
Результат | array |
public bool $redirect_location | ||
Результат | boolean |
public bool $redirect_status | ||
Результат | boolean |
public bool $remote | ||
Результат | boolean |
public int $seconds | ||
Результат | integer |
public array $skip_cookies | ||
Результат | array |
public int $started | ||
Результат | integer |
public array $uncached_headers | ||
Результат | array |
public array $unique | ||
Результат | array |
public array $vary | ||
Результат | array |