core/xpdo/cache/xpdoapccache.class.php
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
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
$initialized= 'false'
false
Details- Type
- n/a
- Inherited_from
- \xPDOCache::$$initialized
$key= ''''
''
Details- Type
- n/a
- Inherited_from
- \xPDOCache::$$key
$options= 'array()'
array()
Details- Type
- n/a
- Inherited_from
- \xPDOCache::$$options
$xpdo= 'null'
null
Details- Type
- n/a
- Inherited_from
- \xPDOCache::$$xpdo
Methods
add(
string $key, string $var, integer $expire
=
0, array $options
=
array()
)
:
boolean
Adds a value to the cache.
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. |
Type | Description |
---|---|
boolean | True if successful |
delete(
string $key, array $options
=
array()
)
:
boolean
Deletes a value from the cache.
Name | Type | Description |
---|---|---|
$key | string | A unique key identifying the item being deleted. |
$options | array | Additional options for the operation. |
Type | Description |
---|---|
boolean | True if successful |
flush(
array $options
=
array()
)
:
boolean
Flush all values from the cache.
Name | Type | Description |
---|---|---|
$options | array | Additional options for the operation. |
Type | Description |
---|---|
boolean | True if successful. |
get(
string $key, array $options
=
array()
)
:
mixed
Gets a value from the cache.
Name | Type | Description |
---|---|---|
$key | string | A unique key identifying the item to fetch. |
$options | array | Additional options for the operation. |
Type | Description |
---|---|
mixed | The value retrieved from the cache. |
getCacheKey(
string $key, array $options
=
array()
)
:
string
Get the actual cache key the implementation will use.
Inherited from: \xPDOCache::getCacheKey()Name | Type | Description |
---|---|---|
$key | string | The identifier the application uses. |
$options | array | Additional options for the operation. |
Type | Description |
---|---|
string | The identifier with any implementation specific prefixes or other transformations applied. |
getOption(
string $key, array $options
=
array(), mixed $default
=
null
)
:
mixed
Get an option from supplied options, the cache options, or the xpdo config.
Inherited from: \xPDOCache::getOption()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. |
Type | Description |
---|---|
mixed | The value of the option. |
isInitialized(
)
:
boolean
Indicates if this xPDOCache instance has been properly initialized.
Inherited from: \xPDOCache::isInitialized()Type | Description |
---|---|
boolean | true if the implementation was initialized successfully. |
replace(
string $key, string $var, integer $expire
=
0, array $options
=
array()
)
:
boolean
Replaces a value in the cache.
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. |
Type | Description |
---|---|
boolean | True if successful |
set(
string $key, string $var, integer $expire
=
0, array $options
=
array()
)
:
boolean
Sets a value in the cache.
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. |
Type | Description |
---|---|
boolean | True if successful |