Constants

OUTPUT_CACHE_KEY_PREFIX

OUTPUT_CACHE_KEY_PREFIX

OUTPUT_CACHE_AFFECTED_TABLE_UNIQUE_NAMES

OUTPUT_CACHE_AFFECTED_TABLE_UNIQUE_NAMES

FILESYSTEM_OUTPUT_CACHE_PATH

FILESYSTEM_OUTPUT_CACHE_PATH

HTTP_HEADERS_META_DATA_KEY

HTTP_HEADERS_META_DATA_KEY

Properties

$_IGNORED_HTTP_HEADERS

$_IGNORED_HTTP_HEADERS : 

Type

$_hash

$_hash : 

Type

$_version

$_version : 

Type

$_path

$_path : 

Type

$_handle

$_handle : resource

Type

resource

$_header

$_header : object

Type

object

$_cacheData

$_cacheData : 

Type

$_CURRENT_VERSION

$_CURRENT_VERSION : 

Type

Methods

__construct()

__construct(string  $cacheKey, boolean  $isHash = false, null|string  $dirName = null) 

Constructor

Parameters

string $cacheKey
boolean $isHash
null|string $dirName

getHash()

getHash() : null|string

Gets cache hash

Returns

null|string

getPath()

getPath() : string

Returns the path

Returns

string

save()

save(integer  $timeToLive, string  $data, \stdClass|null  $metaData = null) : void

Save data to cache

Parameters

integer $timeToLive
string $data
\stdClass|null $metaData

saveAsHttpOutputCache()

saveAsHttpOutputCache(string  $uri, boolean  $hasQueryString, integer  $timeToLive, string  $data, \stdClass|null  $metaData = null) : void

Save data for output cache

Parameters

string $uri
boolean $hasQueryString
integer $timeToLive
string $data
\stdClass|null $metaData

load()

load() : \stdClass

Loads data from cache

Returns

\stdClass

getData()

getData() : integer

Gets cache data

Returns

integer

getDataSize()

getDataSize() : integer

Gets cache data size

Returns

integer

getTimeToLive()

getTimeToLive() : array

Gets time to live

Returns

array

getCreationTime()

getCreationTime() : array

Get creation time

Returns

array

getMetaData()

getMetaData() : object

Gets the added meta data

Returns

object

getMetaDataValue()

getMetaDataValue(string  $key) : null|string

Gets a meta data value

Parameters

string $key

Returns

null|string

isValid()

isValid() : boolean

Cache is valid

Returns

boolean

delete()

delete() : boolean

Removes cache

Returns

boolean

handleHTTPOutputCache()

handleHTTPOutputCache(boolean  $applicationInitialized) : boolean

Handles http output cache

Parameters

boolean $applicationInitialized

Returns

boolean

createHTTPOutputCache()

createHTTPOutputCache(string  $httpData) : boolean

Create http output cache

Parameters

string $httpData

Returns

boolean

clearHTTPOutputCache()

clearHTTPOutputCache() 

Clear http output cache

_open()

_open() : resource|null

Opens cache

Returns

resource|null

_close()

_close() : void

Closes cache

_getData()

_getData() : null|string

Gets cache data

Returns

null|string

_getHeader()

_getHeader() : \stdClass

Returns header of file

Returns

\stdClass

_readHeader()

_readHeader(resource  $handle) : void

Reads cache header

Parameters

resource $handle

_createHeader()

_createHeader(integer  $timeToLive, integer  $dataSize, \stdClass|null  $metaData = null) : string

Creates a Header

Note: The Header Format is as follows: Header-Length|TIMETOLIVE;DATA-LENGTH;serialized-metaData

Parameters

integer $timeToLive
integer $dataSize
\stdClass|null $metaData

Returns

string

_parseHeader()

_parseHeader(resource  $handle) : \stdClass

Parses the header

Parameters

resource $handle

Returns

\stdClass