PHP 클래스 CampCache

사용 중단: from 4.3, removed in 4.4, use newscoop.cache service
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 메소드들

메소드 설명
GetFetchRequests ( )
GetHits ( )
GetMissKeys ( )
GetStoreRequests ( ) fn genKey
IsEnabled ( $p_cacheEngine = null ) : boolean Returns true if the given cache engine was enabled
IsSupported ( $p_cacheEngine = null ) : boolean Returns true if the given cache engine was supported
add ( $p_key, $p_data, $p_ttl ) : boolean Alias for the store() method.
clear ( $p_type = null ) : boolean Clears the cache.
delete ( $p_key ) : boolean Remove the object with given cache key from cache.
fetch ( $p_key ) : mixed Fetch an object from cache.
info ( $p_type = null ) : mixed Retrieves cache information and metadata from the cache store.
initialized ( ) fn __construct
meminfo ( ) : mixed Retrieves shared memory allocation information.
singleton ( ) : CampCache Singleton function that returns the global class object.
store ( $p_key, $p_data, $p_ttl ) : boolean Store the given data into cache.

비공개 메소드들

메소드 설명
__construct ( $p_cacheEngine ) CampCache class constructor.
genKey ( $p_data ) : string Generates the hash key for a cache object.
serialize ( $p_data ) : string Serializes the given data.
unserialize ( $p_serial ) : mixed Unserializes the given serialized data.

메소드 상세

GetFetchRequests() 공개 정적인 메소드

public static GetFetchRequests ( )

GetHits() 공개 정적인 메소드

public static GetHits ( )

GetMissKeys() 공개 정적인 메소드

public static GetMissKeys ( )

GetStoreRequests() 공개 정적인 메소드

fn genKey
public static GetStoreRequests ( )

IsEnabled() 공개 정적인 메소드

Returns true if the given cache engine was enabled
public static IsEnabled ( $p_cacheEngine = null ) : boolean
$p_cacheEngine
리턴 boolean TRUE on success, FALSE on failure

IsSupported() 공개 정적인 메소드

Returns true if the given cache engine was supported
public static IsSupported ( $p_cacheEngine = null ) : boolean
$p_cacheEngine
리턴 boolean TRUE on success, FALSE on failure

add() 공개 메소드

An apc_add() method will be available in future releases of APC providing a different behave than apc_store(). This is basically why we implement this alias function.
public add ( $p_key, $p_data, $p_ttl ) : boolean
$p_key The cache key for the object
$p_data The expected data to be cached
리턴 boolean TRUE on success, FALSE on failure

clear() 공개 메소드

Clears the cache.
public clear ( $p_type = null ) : boolean
$p_type If given is 'user', the user cache will be cleard, otherwise the system cache (cached files) will be.
리턴 boolean TRUE on success, FALSE on failure

delete() 공개 메소드

Remove the object with given cache key from cache.
public delete ( $p_key ) : boolean
$p_key The cache key for the object.
리턴 boolean TRUE on success, FALSE on failure

fetch() 공개 메소드

Fetch an object from cache.
public fetch ( $p_key ) : mixed
리턴 mixed The unserialized data.

info() 공개 메소드

Retrieves cache information and metadata from the cache store.
public info ( $p_type = null ) : mixed
$p_type If given is 'user', information about the user cache will be returned, otherwise system cache information.
리턴 mixed array Cached data and metadata boolean FALSE on failure

initialized() 공개 정적인 메소드

fn __construct
public static initialized ( )

meminfo() 공개 메소드

Retrieves shared memory allocation information.
public meminfo ( ) : mixed
리턴 mixed array Shared memory allocation data boolean FALSE on failure

singleton() 공개 정적인 메소드

Singleton function that returns the global class object.
public static singleton ( ) : CampCache
리턴 CampCache

store() 공개 메소드

Store the given data into cache.
public store ( $p_key, $p_data, $p_ttl ) : boolean
$p_key The cache key for the object
$p_data The expected data to be cached
리턴 boolean TRUE on success, FALSE on failure