Class XoopsCacheApc
APC storage engine for cache
-
XoopsCacheEngine
-
XoopsCacheApc
Methods summary
public
boolean
|
#
init( array $settings = array() )
Initialize the Cache Engine
Initialize the Cache Engine
Called automatically by the cache frontend
To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
Parameters
- $settings
- array of setting for the engine
Returns
boolean True if the engine has been successfully initialized, false if not
See
CacheEngine::__defaults
Overrides
|
public
boolean
|
#
write( string $key, mixed $value, integer $duration = null )
Write data for key into cache
Write data for key into cache
Parameters
- $key
- Identifier for the data
- $value
- Data to be cached
- $duration
- How long to cache the data, in seconds
Returns
boolean True if the data was successfully cached, false on failure
Overrides
|
public
mixed
|
#
read( string $key )
Read a key from the cache
Read a key from the cache
Parameters
- $key
- Identifier for the data
Returns
mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it
Overrides
|
public
boolean
|
#
delete( string $key )
Delete a key from the cache
Delete a key from the cache
Parameters
- $key
- Identifier for the data
Returns
boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
Overrides
|
public
boolean
|
#
clear( boolean $check = null )
Delete all keys from the cache
Delete all keys from the cache
Parameters
- $check
- if true will check expiration, otherwise delete all
Returns
boolean True if the cache was successfully cleared, false otherwise
Overrides
|