PHP 클래스 Prado\Caching\TAPCCache

TAPCCache implements a cache application module based on {@link http://www.php.net/apc APC}. 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. To use this module, the APC PHP extension must be loaded and set in the php.ini file the following: apc.cache_by_default=0 Some usage examples of TAPCCache are as follows, $cache=new TAPCCache; // TAPCCache may also be loaded as a Prado application module $cache->init(null); $cache->add('object',$object); $object2=$cache->get('object'); If loaded, TAPCCache will register itself with {@link TApplication} as the cache module. It can be accessed via {@link TApplication::getCache()}. TAPCCache may be configured in application configuration file as follows
부터: 3.0b
저자: Alban Hanry ([email protected])
저자: Knut Urdalen ([email protected])
상속: extends TCache
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
flush ( ) Deletes all values from cache.
init ( $config ) Initializes this module.

보호된 메소드들

메소드 설명
addValue ( $key, $value, $expire ) : boolean Stores a value identified by a key into cache if the cache does not contain this key.
deleteValue ( $key ) : boolean Deletes a value with the specified key from cache This is the implementation of the method declared in the parent class.
getValue ( $key ) : string Retrieves a value from cache with a specified key.
setValue ( $key, $value, $expire ) : boolean Stores a value identified by a key in cache.

메소드 상세

addValue() 보호된 메소드

This is the implementation of the method declared in the parent class.
protected addValue ( $key, $value, $expire ) : boolean
리턴 boolean true if the value is successfully stored into cache, false otherwise

deleteValue() 보호된 메소드

Deletes a value with the specified key from cache This is the implementation of the method declared in the parent class.
protected deleteValue ( $key ) : boolean
리턴 boolean if no error happens during deletion

flush() 공개 메소드

Be careful of performing this operation if the cache is shared by multiple applications.
public flush ( )

getValue() 보호된 메소드

This is the implementation of the method declared in the parent class.
protected getValue ( $key ) : string
리턴 string the value stored in cache, false if the value is not in the cache or expired.

init() 공개 메소드

This method is required by the IModule interface.
public init ( $config )

setValue() 보호된 메소드

This is the implementation of the method declared in the parent class.
protected setValue ( $key, $value, $expire ) : boolean
리턴 boolean true if the value is successfully stored into cache, false otherwise