Previous Class
Solar_Cache_Adapter_File

Solar_Cache_Adapter_Memcache
Overview

Next Page
Constants

Solar_Cache_Adapter_Memcache

Memcache cache controller.

This adapter lets you connect to a memcached server, which uses system memory to cache data. In general, you never need to instantiate it yourself; instead, use Solar_Cache as the frontend for it and specify 'Solar_Cache_Memcache' in the config keys as the 'adapter' value.

This kind of cache is extremely fast, especially when on the same server as the web process, although it may also be accessed via network. This particular adapter uses the PHP memcache extension to manage the cache connection. The extension is not bundled with PHP; you will need to follow the installation instructions before you can use it.

Catalog

This class is part of the Solar_Cache package.

Inheritance:

Constants

None.

Public Properties

These are all the public properties in the Solar_Cache_Adapter_Memcache class.

You can also view the list of all public, protected, and private properties.

$memcache
A memcache client object.

Public Methods

These are all the public methods in the Solar_Cache_Adapter_Memcache 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.
apiVersion()
Reports the API version for this class.
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 name for the entry key.
fetch()
Gets cache entry data.
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()
Updates or inserts cache entry data.
setActive()
Makes the cache active (true) or inactive (false).