Implements interfaces:
TCache class
TCache is the base class for cache classes with different cache storage implementation.
TCache implements the interface ICache with the following methods,
By definition, cache does not ensure the existence of a value even if it never expires. Cache is not meant to be an persistent storage.
Child classes must implement the following methods:
and optionally flushSince version 3.1.2, TCache implements the ArrayAccess interface such that the cache acts as an array.
Located in /Caching/TCache.php (line 49)
TComponent | --TApplicationComponent | --TModule | --TCache
Class | Description |
---|---|
TAPCCache | TAPCCache class |
TDbCache | TDbCache class |
TMemCache | TMemCache class |
TSqliteCache | TSqliteCache class |
TXCache | TXCache class |
Stores a value identified by a key into cache if the cache does not contain this key.
Nothing will be done if the cache already contains the key.
Stores a value identified by a key into cache if the cache does not contain this key.
This method should be implemented by child classes to store the data in specific cache storage. The uniqueness and dependency are handled in add() already. So only the implementation of data storage is needed.
Deletes a value with the specified key from cache
Deletes a value with the specified key from cache This method should be implemented by child classes to delete the data from actual cache storage.
Deletes all values from cache.
Be careful of performing this operation if the cache is shared by multiple applications. Child classes may implement this method to realize the flush operation.
Retrieves a value from cache with a specified key.
Retrieves a value from cache with a specified key.
This method should be implemented by child classes to store the data in specific cache storage. The uniqueness and dependency are handled in get() already. So only the implementation of data retrieval is needed.
Initializes the cache module.
This method initializes the cache key prefix and registers the cache module with the application if the cache is primary.
Returns whether there is a cache entry with a specified key.
This method is required by the interface ArrayAccess.
Stores a value identified by a key into cache.
If the cache already contains such a key, the existing value and expiration time will be replaced with the new ones.
Stores a value identified by a key in cache.
This method should be implemented by child classes to store the data in specific cache storage. The uniqueness and dependency are handled in set() already. So only the implementation of data storage is needed.
Inherited From TModule
TModule::getID()
TModule::init()
TModule::setID()
Inherited From TApplicationComponent
TApplicationComponent::getApplication()
TApplicationComponent::getRequest()
TApplicationComponent::getResponse()
TApplicationComponent::getService()
TApplicationComponent::getSession()
TApplicationComponent::getUser()
TApplicationComponent::publishAsset()
TApplicationComponent::publishFilePath()
Inherited From TComponent
TComponent::addParsedObject()
TComponent::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::createdOnTemplate()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Documentation generated on Mon, 21 Apr 2008 11:32:01 -0400 by phpDocumentor 1.3.0RC4