PHP 클래스 WP_Spider_Cache_Output

파일 보기 프로젝트 열기: stuttter/wp-spider-cache

공개 프로퍼티들

프로퍼티 타입 설명
$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