core/xpdo/cache/xpdoapccache.class.php

Show: inherited
Table of Contents

Provides an APC-powered xPDOCache implementation.

This requires the APC extension for PHP, version 3.1.4 or later. Earlier versions did not have all the necessary user cache methods.

Package
xpdo  
Subpackage
cache  

\xPDOAPCCache

Package: xpdo\cache

Provides an APC-powered xPDOCache implementation.

This requires the APC extension for PHP, version 3.1.4 or later. Earlier versions did not have all the necessary user cache methods.

Parent(s)
\xPDOCache

Properties

Propertyprotected  $initialized= 'false'
inheritedInherited from: \xPDOCache::$$initialized
Default valuefalseDetails
Type
n/a
Inherited_from
\xPDOCache::$$initialized  
Propertyprotected  $key= ''''
inheritedInherited from: \xPDOCache::$$key
Default value''Details
Type
n/a
Inherited_from
\xPDOCache::$$key  
Propertyprotected  $options= 'array()'
inheritedInherited from: \xPDOCache::$$options
Default valuearray()Details
Type
n/a
Inherited_from
\xPDOCache::$$options  
Propertypublic  $xpdo= 'null'
inheritedInherited from: \xPDOCache::$$xpdo
Default valuenullDetails
Type
n/a
Inherited_from
\xPDOCache::$$xpdo  

Methods

methodpublic__construct(  $xpdo,  $options = array() ) : void

Parameters
Name Type Description
$xpdo
$options
methodpublicadd( string $key, string $var, integer $expire = 0, array $options = array() ) : boolean

Adds a value to the cache.

Parameters
Name Type Description
$key string

A unique key identifying the item being set.

$var string

A reference to the PHP variable representing the item.

$expire integer

The amount of seconds for the variable to expire in.

$options array

Additional options for the operation.

Returns
Type Description
boolean True if successful
methodpublicdelete( string $key, array $options = array() ) : boolean

Deletes a value from the cache.

Parameters
Name Type Description
$key string

A unique key identifying the item being deleted.

$options array

Additional options for the operation.

Returns
Type Description
boolean True if successful
methodpublicflush( array $options = array() ) : boolean

Flush all values from the cache.

Parameters
Name Type Description
$options array

Additional options for the operation.

Returns
Type Description
boolean True if successful.
methodpublicget( string $key, array $options = array() ) : mixed

Gets a value from the cache.

Parameters
Name Type Description
$key string

A unique key identifying the item to fetch.

$options array

Additional options for the operation.

Returns
Type Description
mixed The value retrieved from the cache.
methodpublicgetCacheKey( string $key, array $options = array() ) : string
inherited

Get the actual cache key the implementation will use.

Inherited from: \xPDOCache::getCacheKey()
Parameters
Name Type Description
$key string

The identifier the application uses.

$options array

Additional options for the operation.

Returns
Type Description
string The identifier with any implementation specific prefixes or other transformations applied.
methodpublicgetOption( string $key, array $options = array(), mixed $default = null ) : mixed
inherited

Get an option from supplied options, the cache options, or the xpdo config.

Inherited from: \xPDOCache::getOption()
Parameters
Name Type Description
$key string

Unique identifier for the option.

$options array

A set of explicit options to override those from xPDO or the xPDOCache implementation.

$default mixed

An optional default value to return if no value is found.

Returns
Type Description
mixed The value of the option.
methodpublicisInitialized( ) : boolean
inherited

Indicates if this xPDOCache instance has been properly initialized.

Inherited from: \xPDOCache::isInitialized()
Returns
Type Description
boolean true if the implementation was initialized successfully.
methodpublicreplace( string $key, string $var, integer $expire = 0, array $options = array() ) : boolean

Replaces a value in the cache.

Parameters
Name Type Description
$key string

A unique key identifying the item being set.

$var string

A reference to the PHP variable representing the item.

$expire integer

The amount of seconds for the variable to expire in.

$options array

Additional options for the operation.

Returns
Type Description
boolean True if successful
methodpublicset( string $key, string $var, integer $expire = 0, array $options = array() ) : boolean

Sets a value in the cache.

Parameters
Name Type Description
$key string

A unique key identifying the item being set.

$var string

A reference to the PHP variable representing the item.

$expire integer

The amount of seconds for the variable to expire in.

$options array

Additional options for the operation.

Returns
Type Description
boolean True if successful
Documentation was generated by DocBlox 0.18.1.