PHP 클래스 batcache, batcache

파일 보기 프로젝트 열기: Automattic/batcache 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cache_control Set false to hide the batcache info
$cache_redirects Add headers here as name=>value or name=>array(values). These will be sent with every response from the cache.
$cancel Set false to disable Last-Modified and Cache-Control headers
$debug These headers will never be cached. Apply strtolower.
$do
$genlock
$group ..in this many seconds (zero to ignore this and use batcache immediately)
$headers Array of functions for create_function. The return value is added to $unique above.
$max_age This is the base configuration. You can edit these variables or move them into your wp-config.php file.
$noskip_cookies Change this to cancel the output buffer. Use batcache_cancel();
$query Names of cookies - if they exist and the cache would normally be bypassed, don't bypass it
$redirect_location This is set to the response code during a redirect.
$redirect_status Set true to enable redirect caching.
$remote Expire batcache items aged this many seconds (zero to disable batcache)
$seconds .. (two or more)
$times Zero disables sending buffers to remote datacenters (req/sec is never sent)
$uncached_headers Is it ok to return stale cached response when updating the cache?
$unique Name of memcached group. You can simulate a cache flush by changing this.
$use_stale This is set to the redirect location.
$vary If you conditionally serve different content, put the variable values here.

공개 메소드들

메소드 설명
__construct ( $settings )
add_debug_from_cache ( )
add_debug_html_to_output ( $debug_html )
add_debug_just_cached ( )
add_variant ( $function )
configure_groups ( )
do_headers ( $headers1, $headers2 = [] )
do_variants ( $dimensions = false )
generate_keys ( )
is_ssl ( )
ob ( $output )
redirect_status ( $status, $location )
status_header ( $status_header, $status_code )
timer_stop ( $display, $precision = 3 ) Defined here because timer_stop() calls number_format_i18n()

메소드 상세

__construct() 공개 메소드

public __construct ( $settings )

add_debug_from_cache() 공개 메소드

add_debug_html_to_output() 공개 메소드

public add_debug_html_to_output ( $debug_html )

add_debug_just_cached() 공개 메소드

add_variant() 공개 메소드

public add_variant ( $function )

configure_groups() 공개 메소드

public configure_groups ( )

do_headers() 공개 메소드

public do_headers ( $headers1, $headers2 = [] )

do_variants() 공개 메소드

public do_variants ( $dimensions = false )

generate_keys() 공개 메소드

public generate_keys ( )

is_ssl() 공개 메소드

public is_ssl ( )

ob() 공개 메소드

public ob ( $output )

redirect_status() 공개 메소드

public redirect_status ( $status, $location )

status_header() 공개 메소드

public status_header ( $status_header, $status_code )

timer_stop() 공개 메소드

Defined here because timer_stop() calls number_format_i18n()
public timer_stop ( $display, $precision = 3 )

프로퍼티 상세

$cache_control 공개적으로 프로퍼티

Set false to hide the batcache info
public $cache_control

$cache_redirects 공개적으로 프로퍼티

Add headers here as name=>value or name=>array(values). These will be sent with every response from the cache.
public $cache_redirects

$cancel 공개적으로 프로퍼티

Set false to disable Last-Modified and Cache-Control headers
public $cancel

$debug 공개적으로 프로퍼티

These headers will never be cached. Apply strtolower.
public $debug

$do 공개적으로 프로퍼티

public $do

$genlock 공개적으로 프로퍼티

public $genlock

$group 공개적으로 프로퍼티

..in this many seconds (zero to ignore this and use batcache immediately)
public $group

$headers 공개적으로 프로퍼티

Array of functions for create_function. The return value is added to $unique above.
public $headers

$max_age 공개적으로 프로퍼티

This is the base configuration. You can edit these variables or move them into your wp-config.php file.
public $max_age

$noskip_cookies 공개적으로 프로퍼티

Change this to cancel the output buffer. Use batcache_cancel();
public $noskip_cookies

$query 공개적으로 프로퍼티

Names of cookies - if they exist and the cache would normally be bypassed, don't bypass it
public $query

$redirect_location 공개적으로 프로퍼티

This is set to the response code during a redirect.
public $redirect_location

$redirect_status 공개적으로 프로퍼티

Set true to enable redirect caching.
public $redirect_status

$remote 공개적으로 프로퍼티

Expire batcache items aged this many seconds (zero to disable batcache)
public $remote

$seconds 공개적으로 프로퍼티

.. (two or more)
public $seconds

$times 공개적으로 프로퍼티

Zero disables sending buffers to remote datacenters (req/sec is never sent)
public $times

$uncached_headers 공개적으로 프로퍼티

Is it ok to return stale cached response when updating the cache?
public $uncached_headers

$unique 공개적으로 프로퍼티

Name of memcached group. You can simulate a cache flush by changing this.
public $unique

$use_stale 공개적으로 프로퍼티

This is set to the redirect location.
public $use_stale

$vary 공개적으로 프로퍼티

If you conditionally serve different content, put the variable values here.
public $vary