PHP Class Neos\Flow\Persistence\Doctrine\CacheAdapter

Inheritance: implements Doctrine\Common\Cache\Cache
Mostrar archivo Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$cache Neos\Cache\Frontend\FrontendInterface
$securityContext Neos\Flow\Security\Context

Public Methods

Method Description
contains ( string $id ) : boolean Tests if an entry exists in the cache.
delete ( string $id ) : boolean Deletes a cache entry.
fetch ( string $id ) : mixed Fetches an entry from the cache.
getStats ( ) : array | null Retrieves cached information from the data store.
save ( string $id, mixed $data, integer $lifeTime ) : boolean Puts data into the cache.
setCache ( Neos\Cache\Frontend\FrontendInterface $cache ) : void Set the cache this adapter should use.

Protected Methods

Method Description
convertCacheIdentifier ( string $id ) : string

Method Details

contains() public method

Tests if an entry exists in the cache.
public contains ( string $id ) : boolean
$id string The cache id of the entry to check for.
return boolean TRUE if a cache entry exists for the given cache id, FALSE otherwise.

convertCacheIdentifier() protected method

protected convertCacheIdentifier ( string $id ) : string
$id string
return string

delete() public method

Deletes a cache entry.
public delete ( string $id ) : boolean
$id string The cache id.
return boolean TRUE if the cache entry was successfully deleted, FALSE otherwise.

fetch() public method

Fetches an entry from the cache.
public fetch ( string $id ) : mixed
$id string The id of the cache entry to fetch.
return mixed The cached data or FALSE, if no cache entry exists for the given id.

getStats() public method

The server's statistics array has the following values: - hits Number of keys that have been requested and found present. - misses Number of items that have been requested and not found. - uptime Time that the server is running. - memory_usage Memory used by this server to store items. - memory_available Memory allowed to use for storage.
public getStats ( ) : array | null
return array | null An associative array with server's statistics if available, NULL otherwise.

save() public method

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

setCache() public method

Set the cache this adapter should use.
public setCache ( Neos\Cache\Frontend\FrontendInterface $cache ) : void
$cache Neos\Cache\Frontend\FrontendInterface
return void

Property Details

$cache protected_oe property

protected FrontendInterface,Neos\Cache\Frontend $cache
return Neos\Cache\Frontend\FrontendInterface

$securityContext protected_oe property

protected Context,Neos\Flow\Security $securityContext
return Neos\Flow\Security\Context