# Cache Class Reference

Inheritance diagram for Cache:
[legend]

List of all members.

## Static Public Member Functions

static | me ()
static | setPeer (CachePeer $peer)
static | setDefaultWorker ($worker)
static | setDaoMap ($map)
| associative array, className -> workerName
static | appendDaoMap ($map)
static | worker ($dao)
static | dropWorkers ()

## Public Attributes

const | NOT_FOUND = 'nil'
const | EXPIRES_FOREVER = 604800
const | EXPIRES_MAXIMUM = 21600
const | EXPIRES_MEDIUM = 3600
const | EXPIRES_MINIMUM = 300
const | DO_NOT_CACHE = -2005

## Static Private Attributes

static | $map = null
| map dao -> worker
static | $peer = null
| selected peer
static | $worker = null
| default worker
static | $instances = array()
| spawned workers

## Detailed Description

Definition at line 22 of file Cache.class.php.

## Member Function Documentation

static Cache::appendDaoMap | ( | $ | map | ) | `[static]`

Definition at line 76 of file Cache.class.php.

References $map, and setDaoMap().

Here is the call graph for this function:

static Cache::dropWorkers | ( |  | ) | `[static]`

Definition at line 104 of file Cache.class.php.

static Cache::me | ( |  | ) | `[static]`

Returns:
  CachePeer

Implements Instantiatable.

Examples:
  cacheSettings.php.

Definition at line 48 of file Cache.class.php.

Referenced by VoodooDaoWorker::__construct(), CustomDataScopedWorker::__construct(), BaseDaoWorker::__construct(), TransparentDaoWorker::cacheById(), CommonDaoWorker::cacheById(), VoodooDaoWorker::cacheByQuery(), SmartDaoWorker::cacheByQuery(), CommonDaoWorker::cacheByQuery(), CacheDaoWorker::cacheByQuery(), CustomDataScopedWorker::cacheData(), VoodooDaoWorker::cacheListByQuery(), SmartDaoWorker::cacheListByQuery(), CacheDaoWorker::cacheListByQuery(), TransparentDaoWorker::cacheNullById(), SmartDaoWorker::checkMap(), CacheSegmentHandler::drop(), VoodooDaoWorker::gentlyGetByKey(), SmartDaoWorker::gentlyGetByKey(), CacheDaoWorker::gentlyGetByKey(), BaseDaoWorker::getCachedById(), BaseDaoWorker::getCachedByQuery(), CustomDataScopedWorker::getCachedData(), CacheDaoWorker::getLayerId(), TransparentDaoWorker::getListByIds(), CommonDaoWorker::getListByIds(), CacheSegmentHandler::ping(), SmartDaoWorker::syncMap(), CacheSegmentHandler::touch(), BaseDaoWorker::uncacheById(), BaseDaoWorker::uncacheByQuery(), SmartDaoWorker::uncacheLists(), CacheDaoWorker::uncacheLists(), and CacheSegmentHandler::unlink().

static Cache::setDaoMap | ( | $ | map | ) | `[static]`

associative array, className -> workerName

Definition at line 71 of file Cache.class.php.

References $map.

Referenced by appendDaoMap().

static Cache::setDefaultWorker | ( | $ | worker | ) | `[static]`

Definition at line 61 of file Cache.class.php.

References $worker, and Assert::classExists().

Here is the call graph for this function:

static Cache::setPeer | ( | CachePeer $ | peer | ) | `[static]`

Examples:
  cacheSettings.php.

Definition at line 56 of file Cache.class.php.

static Cache::worker | ( | $ | dao | ) | `[static]`

Returns:
  BaseDaoWorker

Definition at line 87 of file Cache.class.php.

References $worker.

Referenced by GenericDAO::dropById(), GenericDAO::dropByIds(), GenericDAO::getById(), GenericDAO::getByLogic(), GenericDAO::getByQuery(), GenericDAO::getCustom(), GenericDAO::getCustomList(), GenericDAO::getCustomRowList(), GenericDAO::getListByIds(), GenericDAO::getListByLogic(), GenericDAO::getListByQuery(), GenericDAO::getPlainList(), GenericDAO::getQueryResult(), GenericDAO::getTotalCount(), StorableDAO::merge(), GenericDAO::uncacheById(), GenericDAO::uncacheByIds(), and GenericDAO::uncacheLists().

## Member Data Documentation

Cache::$instances = array()`[static, private]`

spawned workers

Definition at line 43 of file Cache.class.php.

Cache::$map = null`[static, private]`

map dao -> worker

Definition at line 34 of file Cache.class.php.

Referenced by appendDaoMap(), and setDaoMap().

Cache::$peer = null`[static, private]`

selected peer

Definition at line 37 of file Cache.class.php.

Cache::$worker = null`[static, private]`

default worker

Definition at line 40 of file Cache.class.php.

Referenced by setDefaultWorker(), and worker().

const Cache::DO_NOT_CACHE = -2005

Definition at line 31 of file Cache.class.php.

Referenced by CommonDaoWorker::cacheById(), CommonDaoWorker::cacheByQuery(), NullDaoWorker::getById(), CommonDaoWorker::getById(), NullDaoWorker::getByLogic(), NullDaoWorker::getByQuery(), CommonDaoWorker::getByQuery(), NullDaoWorker::getCustom(), CommonDaoWorker::getCustom(), NullDaoWorker::getCustomList(), CommonDaoWorker::getCustomList(), NullDaoWorker::getCustomRowList(), CommonDaoWorker::getCustomRowList(), CommonDaoWorker::getListByIds(), NullDaoWorker::getListByLogic(), NullDaoWorker::getListByQuery(), CommonDaoWorker::getListByQuery(), NullDaoWorker::getPlainList(), NullDaoWorker::getQueryResult(), CommonDaoWorker::getQueryResult(), and Memcached::store().

const Cache::EXPIRES_FOREVER = 604800

Definition at line 26 of file Cache.class.php.

Referenced by VoodooDaoWorker::cacheListByQuery(), SmartDaoWorker::cacheListByQuery(), CacheDaoWorker::cacheListByQuery(), TransparentDaoWorker::cacheNullById(), TransparentDaoWorker::getById(), TransparentDaoWorker::getByLogic(), TransparentDaoWorker::getByQuery(), TransparentDaoWorker::getCustom(), TransparentDaoWorker::getCustomList(), TransparentDaoWorker::getCustomRowList(), CacheDaoWorker::getLayerId(), TransparentDaoWorker::getListByLogic(), TransparentDaoWorker::getPlainList(), TransparentDaoWorker::getQueryResult(), eAcceleratorSegmentHandler::storeMap(), ApcSegmentHandler::storeMap(), SmartDaoWorker::syncMap(), CacheSegmentHandler::touch(), and CacheSegmentHandler::unlink().

const Cache::EXPIRES_MAXIMUM = 21600

Definition at line 27 of file Cache.class.php.

const Cache::EXPIRES_MEDIUM = 3600

Definition at line 28 of file Cache.class.php.

const Cache::EXPIRES_MINIMUM = 300

Definition at line 29 of file Cache.class.php.

Referenced by MemcachedLocker::get().

const Cache::NOT_FOUND = 'nil'

Definition at line 24 of file Cache.class.php.

Referenced by VoodooDaoWorker::cacheListByQuery(), SmartDaoWorker::cacheListByQuery(), CacheDaoWorker::cacheListByQuery(), TransparentDaoWorker::cacheNullById(), CommonDaoWorker::getById(), TransparentDaoWorker::getByQuery(), CommonDaoWorker::getByQuery(), TransparentDaoWorker::getCustom(), CommonDaoWorker::getCustom(), TransparentDaoWorker::getCustomList(), CommonDaoWorker::getCustomList(), TransparentDaoWorker::getCustomRowList(), CommonDaoWorker::getCustomRowList(), TransparentDaoWorker::getListByIds(), CommonDaoWorker::getListByIds(), TransparentDaoWorker::getListByQuery(), and CommonDaoWorker::getListByQuery().

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

- core/Cache/Cache.class.php