Overview
Xcache cache controller.
Xcache is a fast, stable PHP opcode cacher tested and supported on all of the latest PHP cvs branches.
The Xcache extension is not bundled with PHP; you will need to install it on your server before you can use it. More info on the » Xcache homepage.
Configuration Keys
active
: Whether or not the cache should be active at instantiation.life
: The lifetime of each cache entry in seconds.prefix
: A prefix to place in front of every cache entry key; e.g., use this to deconflict between identical cache keys in caches shared among different domains or environments.user
: Admin user name for Xcache, as set in php.ini. This login and the corresponding password are required only for the deleteAll() method. Defaults tonull
.pass
: Plaintext password that matches the MD5-encrypted password in php.ini. This password and the corresponding login are required only for the deleteAll() method. Defaults tonull
.
Constants
None.
Public Properties
The Solar_Cache_Adapter_Xcache class has no public properties; try the list of all properties.
Public Methods
These are all the public methods in the Solar_Cache_Adapter_Xcache class.
You can also view the list of all public, protected, and private methods.
-
__construct()
-
Constructor.
-
__destruct()
-
Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().
-
add()
-
Inserts cache entry data, but only if the entry does not already exist.
-
delete()
-
Deletes a cache entry.
-
deleteAll()
-
Removes all cache entries.
-
dump()
-
Convenience method for getting a dump the whole object, or one of its properties, or an external variable.
-
entry()
-
Returns the adapter-specific name for the entry key.
-
fetch()
-
Gets cache entry data.
-
fetchOrAdd()
-
Fetches data if it exists; if not, uses a callback to create the data and adds it to the cache in a race-condition-safe way.
-
fetchOrSave()
-
Fetches data if it exists; if not, uses a callback to create the data and saves it to the cache.
-
getLife()
-
Gets the cache lifetime in seconds.
-
increment()
-
Increments a cache entry value by the specified amount.
-
isActive()
-
Gets the current activity state of the cache (on or off).
-
locale()
-
Looks up class-specific locale strings based on a key.
-
save()
-
Sets cache entry data.
-
setActive()
-
Makes the cache active (true) or inactive (false).