PHP 클래스 Cachearium\Backend\CacheRAM

It's a very simple implementation. It's reasonably inneficient because it a 3-level array, but it does invalidation correctly. This is useful for data that is loaded many times in one execution but which may change constantly, or in servers that have no external cache support for a quick speedup.
상속: extends Cachearium\CacheAbstract
파일 보기 프로젝트 열기: corollarium/cachearium 1 사용 예제들

공개 메소드들

메소드 설명
__clone ( ) Prevent users to clone the instance
cleanP ( $base, $id )
clear ( )
delete ( CacheKey $k )
get ( CacheKey $k )
getData ( CacheKey $k ) (non-PHPdoc)
getMemoryLimit ( $memoryLimit )
increment ( $value, CacheKey $k, $default )
limitRAM ( ) : boolean Clears cache if PHP memory usage is above a chosen limit This checks the ENTIRE PHP memory usage, which may be a lot more than what is used by this backend.
prefetch ( $data ) (non-PHPdoc)
report ( )
setMemoryLimit ( integer $memoryLimit ) : CacheRAM
singleton ( ) : CacheRAM Cache constructor (this is a singleton).
store ( $data, CacheKey $k, $lifetime )

보호된 메소드들

메소드 설명
hashKey ( CacheKey $k )

비공개 메소드들

메소드 설명
__construct ( ) Constructor.
checkValidArgs ( CacheKey $k )

메소드 상세

__clone() 공개 메소드

Prevent users to clone the instance
public __clone ( )

cleanP() 공개 메소드

public cleanP ( $base, $id )

clear() 공개 메소드

public clear ( )

delete() 공개 메소드

public delete ( CacheKey $k )
$k Cachearium\CacheKey

get() 공개 메소드

public get ( CacheKey $k )
$k Cachearium\CacheKey

getData() 공개 메소드

(non-PHPdoc)
public getData ( CacheKey $k )
$k Cachearium\CacheKey

getMemoryLimit() 공개 메소드

public getMemoryLimit ( $memoryLimit )

hashKey() 보호된 메소드

protected hashKey ( CacheKey $k )
$k Cachearium\CacheKey

increment() 공개 메소드

public increment ( $value, CacheKey $k, $default )
$k Cachearium\CacheKey

limitRAM() 공개 메소드

Clears cache if PHP memory usage is above a chosen limit This checks the ENTIRE PHP memory usage, which may be a lot more than what is used by this backend.
public limitRAM ( ) : boolean
리턴 boolean

prefetch() 공개 메소드

(non-PHPdoc)
또한 보기: CacheAbstract::prefetch()
public prefetch ( $data )

report() 공개 메소드

public report ( )

setMemoryLimit() 공개 메소드

public setMemoryLimit ( integer $memoryLimit ) : CacheRAM
$memoryLimit integer
리턴 CacheRAM

singleton() 공개 정적인 메소드

Cache constructor (this is a singleton).
public static singleton ( ) : CacheRAM
리턴 CacheRAM The cache singleton.

store() 공개 메소드

public store ( $data, CacheKey $k, $lifetime )
$k Cachearium\CacheKey