XcacheEngine Class Info:

Class Declaration:

class XcacheEngine extends CacheEngine

File name:
Cake/Cache/Engine/XcacheEngine.php
Description:

Xcache storage engine for cache

Class Inheritance

CacheEngine

Properties:

  • settings array

    Settings

    • PHP_AUTH_USER = xcache.admin.user, default cake
    • PHP_AUTH_PW = xcache.admin.password, default cake

_auth

top

Populates and reverses $_SERVER authentication values Makes necessary changes (and reverting them back) in $_SERVER

This has to be done because xcache_clear_cache() needs to pass Basic Http Auth (see xcache.admin configuration settings)

Parameters:
  • boolean $reverse optional false

    Revert changes

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 150
Return

void

clear

top

Delete all keys from the cache

Parameters:
  • boolean $check required

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 130
Return

boolean True if the cache was successfully cleared, false otherwise

decrement

top

Decrements the value of an integer cached key. If the cache key is not an integer it will be treated as 0

Parameters:
  • string $key required

    Identifier for the data

  • integer $offset optional 1

    How much to subtract

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 110
Return

New decremented value, false otherwise

delete

top

Delete a key from the cache

Parameters:
  • string $key required

    Identifier for the data

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 120
Return

boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed

gc

top

Garbage collection

Permanently remove all expired and deleted data

Method defined in:
Cake/Cache/CacheEngine.php on line 56
Return

void

increment

top

Increments the value of an integer cached key If the cache key is not an integer it will be treated as 0

Parameters:
  • string $key required

    Identifier for the data

  • integer $offset optional 1

    How much to increment

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 98
Return

New incremented value, false otherwise

init

top

Initialize the Cache Engine

Called automatically by the cache frontend To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());

Parameters:
  • array $settings optional array ( )

    array of setting for the engine

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 47
Return

boolean True if the engine has been successfully initialized, false if not

key

top

Generates a safe key for use with cache engine storage engines.

Parameters:
  • string $key required

    the key passed over

Method defined in:
Cake/Cache/CacheEngine.php on line 126
Return

mixed string $key or false

read

top

Read a key from the cache

Parameters:
  • string $key required

    Identifier for the data

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 78
Return

mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it

settings

top

Cache Engine settings

Method defined in:
Cake/Cache/CacheEngine.php on line 116
Return

array settings

write

top

Write data for key into cache

Parameters:
  • string $key required

    Identifier for the data

  • mixed $value required

    Data to be cached

  • integer $duration required

    How long to cache the data, in seconds

Method defined in:
Cake/Cache/Engine/XcacheEngine.php on line 66
Return

boolean True if the data was successfully cached, false on failure