# CachePeer Class Reference
[Application-wide cache subsystem]

Abstract cache peer base class. More...

Inheritance diagram for CachePeer:
[legend]

List of all members.

## Public Member Functions

| get ($key)
| delete ($key)
| increment ($key, $value)
| decrement ($key, $value)
| append ($key, $data)
| clean ()
| getList ($indexes)
| set ($key, $value, $expires=Cache::EXPIRES_MEDIUM)
| add ($key, $value, $expires=Cache::EXPIRES_MEDIUM)
| replace ($key, $value, $expires=Cache::EXPIRES_MEDIUM)
| isAlive ()
| mark ($className)
| enableCompression ()
| disableCompression ()

## Public Attributes

const | TIME_SWITCH = 2592000

## Protected Member Functions

| store ($action, $key, $value, $expires=Cache::EXPIRES_MEDIUM)
| prepareData ($value)
| restoreData ($value)

## Protected Attributes

| $alive = false
| $compress = false

## Detailed Description

Abstract cache peer base class.

Definition at line 115 of file CachePeer.class.php.

## Member Function Documentation

CachePeer::add | ( | $ | key,
|  | $ | value,
|  | $ | expires = `Cache::EXPIRES_MEDIUM` |
| ) |  |  | `[final]`

Definition at line 163 of file CachePeer.class.php.

References store().

Referenced by MemcachedLocker::get().

Here is the call graph for this function:

CachePeer::append | ( | $ | key,
|  | $ | data |
| ) |  |  | `[abstract]`

Reimplemented in AggregateCache, DebugCachePeer, Memcached, PeclMemcached, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

CachePeer::clean | ( |  | ) |

Returns:
  CachePeer

Reimplemented in AggregateCache, DebugCachePeer, Memcached, PeclMemcached, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

Definition at line 137 of file CachePeer.class.php.

References Singleton::getAllInstances().

Here is the call graph for this function:

CachePeer::decrement | ( | $ | key,
|  | $ | value |
| ) |  |  | `[abstract]`

Reimplemented in AggregateCache, DebugCachePeer, Memcached, PeclMemcached, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

CachePeer::delete | ( | $ | key | ) | `[abstract]`

Reimplemented in AggregateCache, DebugCachePeer, PeclMemcached, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

CachePeer::disableCompression | ( |  | ) |

Returns:
  CachePeer

Definition at line 198 of file CachePeer.class.php.

CachePeer::enableCompression | ( |  | ) |

Returns:
  CachePeer

Definition at line 189 of file CachePeer.class.php.

CachePeer::get | ( | $ | key | ) | `[abstract]`

Reimplemented in AggregateCache, DebugCachePeer, Memcached, PeclMemcached, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

CachePeer::getList | ( | $ | indexes | ) |

Reimplemented in AggregateCache, DebugCachePeer, Memcached, PeclMemcached, and WatermarkedPeer.

Definition at line 146 of file CachePeer.class.php.

CachePeer::increment | ( | $ | key,
|  | $ | value |
| ) |  |  | `[abstract]`

Reimplemented in AggregateCache, DebugCachePeer, Memcached, PeclMemcached, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

CachePeer::isAlive | ( |  | ) |

Reimplemented in DebugCachePeer, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

Definition at line 173 of file CachePeer.class.php.

Referenced by AggregateCache::addPeer(), AggregateCache::append(), AggregateCache::checkAlive(), AggregateCache::decrement(), AggregateCache::delete(), AggregateCache::get(), AggregateCache::getList(), AggregateCache::increment(), and AggregateCache::store().

CachePeer::mark | ( | $ | className | ) |

Returns:
  CachePeer

Reimplemented in DebugCachePeer, SelectivePeer, and WatermarkedPeer.

Definition at line 181 of file CachePeer.class.php.

CachePeer::prepareData | ( | $ | value | ) | `[protected]`

Definition at line 204 of file CachePeer.class.php.

Referenced by RubberFileSystem::operate(), and SharedMemory::store().

CachePeer::replace | ( | $ | key,
|  | $ | value,
|  | $ | expires = `Cache::EXPIRES_MEDIUM` |
| ) |  |  | `[final]`

Definition at line 168 of file CachePeer.class.php.

References store().

Here is the call graph for this function:

CachePeer::restoreData | ( | $ | value | ) | `[protected]`

Definition at line 212 of file CachePeer.class.php.

Referenced by SharedMemory::get(), and RubberFileSystem::operate().

CachePeer::set | ( | $ | key,
|  | $ | value,
|  | $ | expires = `Cache::EXPIRES_MEDIUM` |
| ) |  |  | `[final]`

Definition at line 158 of file CachePeer.class.php.

References store().

Here is the call graph for this function:

CachePeer::store | ( | $ | action,
|  | $ | key,
|  | $ | value,
|  | $ | expires = `Cache::EXPIRES_MEDIUM` |
| ) |  |  | `[abstract, protected]`

Reimplemented in AggregateCache, DebugCachePeer, Memcached, PeclMemcached, RubberFileSystem, RuntimeMemory, SharedMemory, and WatermarkedPeer.

Referenced by add(), replace(), and set().

## Member Data Documentation

CachePeer::$alive = false`[protected]`

Definition at line 119 of file CachePeer.class.php.

CachePeer::$compress = false`[protected]`

Definition at line 120 of file CachePeer.class.php.

const CachePeer::TIME_SWITCH = 2592000

Definition at line 117 of file CachePeer.class.php.

The documentation for this class was generated from the following file:

- core/Cache/CachePeer.class.php