PHP 인터페이스 Sulu\Component\Cache\MemoizeInterface

파일 보기 프로젝트 열기: sulu/sulu 0 사용 예제들

공개 메소드들

메소드 설명
memoize ( callable $compute, integer $lifeTime = null ) : mixed Returns the value stored in the cache or uses the passed function to compute the value and save to cache This function uses the callstack to generate a unique key for the caching mechanism.
memoizeById ( mixed $id, array $arguments, callable $compute, integer $lifeTime = null ) : mixed Returns the value stored in the cache or uses the passed function to compute the value and save to cache This function uses the given key for the caching mechanism.

메소드 상세

memoize() 공개 메소드

Returns the value stored in the cache or uses the passed function to compute the value and save to cache This function uses the callstack to generate a unique key for the caching mechanism.
public memoize ( callable $compute, integer $lifeTime = null ) : mixed
$compute callable
$lifeTime integer cache lifetime
리턴 mixed

memoizeById() 공개 메소드

Returns the value stored in the cache or uses the passed function to compute the value and save to cache This function uses the given key for the caching mechanism.
public memoizeById ( mixed $id, array $arguments, callable $compute, integer $lifeTime = null ) : mixed
$id mixed
$arguments array array of parameter to call compute function
$compute callable
$lifeTime integer cache lifetime
리턴 mixed