PHP 클래스 Doctrine\Common\Cache\CacheProvider

부터: 2.2
저자: Benjamin Eberlei ([email protected])
저자: Guilherme Blanco ([email protected])
저자: Jonathan Wage ([email protected])
저자: Roman Borschel ([email protected])
저자: Fabio B. Silva ([email protected])
상속: implements Doctrine\Common\Cache\Cache
파일 보기 프로젝트 열기: doctrine/cache 1 사용 예제들

공개 메소드들

메소드 설명
contains ( $id )
delete ( $id )
deleteAll ( ) {@inheritDoc}
fetch ( $id )
fetchMultiple ( array $keys )
flushAll ( ) {@inheritDoc}
getNamespace ( ) : string Retrieves the namespace that prefixes all cache ids.
getStats ( )
save ( $id, $data, $lifeTime )
saveMultiple ( array $keysAndValues, $lifetime )
setNamespace ( string $namespace ) : void Sets the namespace to prefix all cache ids with.

보호된 메소드들

메소드 설명
doContains ( string $id ) : boolean Tests if an entry exists in the cache.
doDelete ( string $id ) : boolean Deletes a cache entry.
doFetch ( string $id ) : mixed | false Fetches an entry from the cache.
doFetchMultiple ( array $keys ) : array Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it.
doFlush ( ) : boolean Flushes all cache entries.
doGetStats ( ) : array | null Retrieves cached information from the data store.
doSave ( string $id, string $data, integer $lifeTime ) : boolean Puts data into the cache.
doSaveMultiple ( array $keysAndValues, integer $lifetime ) : boolean Default implementation of doSaveMultiple. Each driver that supports multi-put should override it.

비공개 메소드들

메소드 설명
getNamespaceCacheKey ( ) : string Returns the namespace cache key.
getNamespaceVersion ( ) : integer Returns the namespace version.
getNamespacedId ( string $id ) : string Prefixes the passed id with the configured namespace value.

메소드 상세

contains() 공개 메소드

public contains ( $id )

delete() 공개 메소드

public delete ( $id )

deleteAll() 공개 메소드

{@inheritDoc}
public deleteAll ( )

doContains() 추상적인 보호된 메소드

Tests if an entry exists in the cache.
abstract protected doContains ( string $id ) : boolean
$id string The cache id of the entry to check for.
리턴 boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.

doDelete() 추상적인 보호된 메소드

Deletes a cache entry.
abstract protected doDelete ( string $id ) : boolean
$id string The cache id.
리턴 boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.

doFetch() 추상적인 보호된 메소드

Fetches an entry from the cache.
abstract protected doFetch ( string $id ) : mixed | false
$id string The id of the cache entry to fetch.
리턴 mixed | false The cached data or FALSE, if no cache entry exists for the given id.

doFetchMultiple() 보호된 메소드

Default implementation of doFetchMultiple. Each driver that supports multi-get should owerwrite it.
protected doFetchMultiple ( array $keys ) : array
$keys array Array of keys to retrieve from cache
리턴 array Array of values retrieved for the given keys.

doFlush() 추상적인 보호된 메소드

Flushes all cache entries.
abstract protected doFlush ( ) : boolean
리턴 boolean TRUE if the cache entries were successfully flushed, FALSE otherwise.

doGetStats() 추상적인 보호된 메소드

Retrieves cached information from the data store.
부터: 2.2
abstract protected doGetStats ( ) : array | null
리턴 array | null An associative array with server's statistics if available, NULL otherwise.

doSave() 추상적인 보호된 메소드

Puts data into the cache.
abstract protected doSave ( string $id, string $data, integer $lifeTime ) : boolean
$id string The cache id.
$data string The cache entry/data.
$lifeTime integer The lifetime. If != 0, sets a specific lifetime for this cache entry (0 => infinite lifeTime).
리턴 boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.

doSaveMultiple() 보호된 메소드

Default implementation of doSaveMultiple. Each driver that supports multi-put should override it.
protected doSaveMultiple ( array $keysAndValues, integer $lifetime ) : boolean
$keysAndValues array Array of keys and values to save in cache
$lifetime integer The lifetime. If != 0, sets a specific lifetime for these cache entries (0 => infinite lifeTime).
리턴 boolean TRUE if the operation was successful, FALSE if it wasn't.

fetch() 공개 메소드

public fetch ( $id )

fetchMultiple() 공개 메소드

public fetchMultiple ( array $keys )
$keys array

flushAll() 공개 메소드

{@inheritDoc}
public flushAll ( )

getNamespace() 공개 메소드

Retrieves the namespace that prefixes all cache ids.
public getNamespace ( ) : string
리턴 string

getStats() 공개 메소드

public getStats ( )

save() 공개 메소드

public save ( $id, $data, $lifeTime )

saveMultiple() 공개 메소드

public saveMultiple ( array $keysAndValues, $lifetime )
$keysAndValues array

setNamespace() 공개 메소드

Sets the namespace to prefix all cache ids with.
public setNamespace ( string $namespace ) : void
$namespace string
리턴 void