class RedisPageCache extends PageCache (View source)

Class RedisPageCache

Properties

static PageCache|null $library from PageCache
static Pool $pool

Methods

deliver(PageCacheRecord $record)

Build a Response object starting from a cached page.

from PageCache
static PageCache
getLibrary()

Get the page cache library.

from PageCache
bool
shouldCheckCache(Request $req)

Determine if we should check if a page is in the cache.

from PageCache
outputCacheHeaders(Page $c) deprecated

Send the cache-related HTTP headers for a page to the current response.

from PageCache
array
getCacheHeaders(Page $c)

Get the cache-related HTTP headers for a page.

from PageCache
bool
shouldAddToCache(PageView $v)

Check if a page contained in a PageView should be stored in the cache.

from PageCache
string|null
getCacheKey(Page|Request|PageCacheRecord|mixed $mixed)

Get the key that identifies the cache entry for a page or a request.

from PageCache
getRecord(Page|Request|mixed $mixed)

No description

set(Page $c, string $content)

No description

purgeByRecord(PageCacheRecord $rec)

No description

purge(Page $c)

No description

flush()

No description

__construct()

RedisPageCache constructor.

ItemInterface
getCacheItem($mixed)

No description

Details

Response deliver(PageCacheRecord $record)

Build a Response object starting from a cached page.

Parameters

PageCacheRecord $record the cache record containing the cached page data

Return Value

Response

static PageCache getLibrary()

Get the page cache library.

Return Value

PageCache

bool shouldCheckCache(Request $req)

Determine if we should check if a page is in the cache.

Parameters

Request $req

Return Value

bool

outputCacheHeaders(Page $c) deprecated

deprecated Headers are no longer set directly. Instead, use the $pageCache->deliver() method to retrieve a response object and either return it from a controller method or, if you must, use $response->prepare($request)->send()

Send the cache-related HTTP headers for a page to the current response.

Parameters

Page $c

array getCacheHeaders(Page $c)

Get the cache-related HTTP headers for a page.

Parameters

Page $c

Return Value

array Keys are the header names; values are the header values

bool shouldAddToCache(PageView $v)

Check if a page contained in a PageView should be stored in the cache.

Parameters

PageView $v

Return Value

bool

string|null getCacheKey(Page|Request|PageCacheRecord|mixed $mixed)

Get the key that identifies the cache entry for a page or a request.

Parameters

Page|Request|PageCacheRecord|mixed $mixed

Return Value

string|null Returns NULL if $mixed is not a recognized type, a string otherwise

PageCacheRecord|null getRecord(Page|Request|mixed $mixed)

Parameters

Page|Request|mixed $mixed

Return Value

PageCacheRecord|null Return NULL if $mixed is not a recognized type, or if it's the record is not in the cache

set(Page $c, string $content)

Parameters

Page $c The page to be stored in the cache
string $content The whole HTML of the page to be stored in the cache

purgeByRecord(PageCacheRecord $rec)

Parameters

PageCacheRecord $rec

purge(Page $c)

Parameters

Page $c

flush()

__construct()

RedisPageCache constructor.

protected ItemInterface getCacheItem($mixed)

Parameters

$mixed

Return Value

ItemInterface