PHP Класс WP_Spider_Cache_Output

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$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()

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

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

Main spider_cache constructor
С версии: 2.0.0
public __construct ( )

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

Add verbose debug info
С версии: 2.0.0
protected add_debug_from_cache ( )

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

Determine where to put what debug output
С версии: 2.0.0
protected add_debug_html_to_output ( string $debug_html = '' ) : void
$debug_html string
Результат void

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

Add some debug info
С версии: 2.0.0
protected add_debug_just_cached ( )

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

Add a variant to the cache key
С версии: 2.0.0
protected add_variant ( string $function = '' )
$function string

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

Configure the cache client
С версии: 2.0.0
protected configure_groups ( )

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

Merge the headers and send them off
С версии: 2.0.0
protected do_headers ( array $headers1, array $headers2 = [] )
$headers1 array
$headers2 array

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

Set the cache with it's variant keys
С версии: 2.0.0
protected do_variants ( type $dimensions = false )
$dimensions type

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

Generate cache keys for the request
С версии: 2.0.0
protected generate_keys ( )

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

Start the output buffer
С версии: 2.0.0
protected ob ( string $output = '' ) : string
$output string
Результат string

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

Set the redirect status, and whether it should be cached
С версии: 2.0.0
public redirect_status ( string $status, string $location ) : type
$status string
$location string
Результат type

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

Start page caching and hook into requests to complete it later
С версии: 2.1.0
protected start ( ) : void
Результат void

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

Set the status header & code
С версии: 2.0.0
public status_header ( string $status_header, integer $status_code = 200 ) : string
$status_header string
$status_code integer
Результат string

Описание свойств

$cache_control публичное свойство

Set false to disable Last-Modified and Cache-Control headers
public bool $cache_control
Результат boolean

$cache_redirects публичное свойство

Set true to enable redirect caching.
public bool $cache_redirects
Результат boolean

$cancel публичное свойство

Change this to cancel the output buffer. Use wp_output_cache_cancel();
public bool $cancel
Результат boolean

$debug публичное свойство

Set false to hide the spider_cache info
public bool $debug
Результат boolean

$group публичное свойство

Name of cache group. You can simulate a cache flush by changing this.
public string $group
Результат string

$headers публичное свойство

These will be sent with every response from the cache.
public array $headers
Результат array

$max_age публичное свойство

Maximum age of a cached page in seconds
public int $max_age
Результат integer

$noskip_cookies публичное свойство

Names of cookies - if they exist and the cache would normally be bypassed, don't bypass it.
public array $noskip_cookies
Результат array

$redirect_location публичное свойство

This is set to the redirect location.
public bool $redirect_location
Результат boolean

$redirect_status публичное свойство

This is set to the response code during a redirect.
public bool $redirect_status
Результат boolean

$remote публичное свойство

False disables sending buffers to remote datacenters
public bool $remote
Результат boolean

$seconds публичное свойство

...in this many seconds (zero to ignore this and use spider_cache immediately)
public int $seconds
Результат integer

$skip_cookies публичное свойство

Names of cookies - if they exist bypass caching.
public array $skip_cookies
Результат array

$started публичное свойство

The timestamp when the object was created
public int $started
Результат integer

$times публичное свойство

.. (two or more)
public int $times
Результат integer

$uncached_headers публичное свойство

These headers will never be cached. Apply strtolower.
public array $uncached_headers
Результат array

$unique публичное свойство

If you conditionally serve different content, put the variable values here.
public array $unique
Результат array

$vary публичное свойство

Array of functions for create_function. The return value is added to $unique above.
public array $vary
Результат array