PHP 클래스 Newscoop\Services\CacheService

파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$cacheDriver Doctrine\Common\Cache\CacheProvider Instance of cache driver
$systemPreferences Newscoop\NewscoopBundle\Services\SystemPreferencesService

공개 메소드들

메소드 설명
__construct ( SystemPreferencesService $systemPreferences ) Initialize cache driver (based on system preferences settings, default is array)
clearNamespace ( $namespace )
contains ( string | array $id ) : boolean Check if cache have provided key
delete ( string | array $id ) : boolean Delete key from cache
fetch ( string | array $id ) : mixed Fetch data from cache
getAvailableCacheEngines ( ) : array Get array of avaiable cache drivers (based on system configurations)
getCacheDriver ( ) : CacheProvider Get cache driver instance
getCacheKey ( $id, $namespace = null )
getNamespace ( $namespace )
save ( string | array $id, mixed $data, integer $lifeTime = 1400 ) : boolean Save new value in cache

메소드 상세

__construct() 공개 메소드

Initialize cache driver (based on system preferences settings, default is array)
public __construct ( SystemPreferencesService $systemPreferences )
$systemPreferences Newscoop\NewscoopBundle\Services\SystemPreferencesService

clearNamespace() 공개 메소드

public clearNamespace ( $namespace )

contains() 공개 메소드

Check if cache have provided key
public contains ( string | array $id ) : boolean
$id string | array
리턴 boolean

delete() 공개 메소드

Delete key from cache
public delete ( string | array $id ) : boolean
$id string | array
리턴 boolean

fetch() 공개 메소드

Fetch data from cache
public fetch ( string | array $id ) : mixed
$id string | array
리턴 mixed

getAvailableCacheEngines() 공개 메소드

Get array of avaiable cache drivers (based on system configurations)
public getAvailableCacheEngines ( ) : array
리턴 array

getCacheDriver() 공개 메소드

Get cache driver instance
public getCacheDriver ( ) : CacheProvider
리턴 Doctrine\Common\Cache\CacheProvider

getCacheKey() 공개 메소드

public getCacheKey ( $id, $namespace = null )

getNamespace() 공개 메소드

public getNamespace ( $namespace )

save() 공개 메소드

Save new value in cache
public save ( string | array $id, mixed $data, integer $lifeTime = 1400 ) : boolean
$id string | array
$data mixed
$lifeTime integer
리턴 boolean

프로퍼티 상세

$cacheDriver 보호되어 있는 프로퍼티

Instance of cache driver
protected CacheProvider,Doctrine\Common\Cache $cacheDriver
리턴 Doctrine\Common\Cache\CacheProvider

$systemPreferences 보호되어 있는 프로퍼티

protected SystemPreferencesService,Newscoop\NewscoopBundle\Services $systemPreferences
리턴 Newscoop\NewscoopBundle\Services\SystemPreferencesService