PHP Class eZ\Publish\Core\MVC\Symfony\Cache\Http\LocationAwareStore

Inheritance: extends Symfony\Component\HttpKernel\HttpCache\Store, implements eZ\Publish\Core\MVC\Symfony\Cache\Http\ContentPurger
Datei anzeigen Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
getFilesystem ( ) : Symfony\Component\Filesystem\Filesystem
getLocationCacheDir ( integer $locationId = null ) : string Returns cache dir for $locationId.
getLocationCacheLockName ( $locationId = null ) : string Returns cache lock name for $locationId.
getPath ( string $key ) : string Returns the right path where cache is being stored.
purgeAllContent ( ) : boolean Purges all cached content.
purgeByRequest ( Request $request ) : boolean Purges data from $request.
setFilesystem ( Symfony\Component\Filesystem\Filesystem $fs ) Injects a Filesystem instance For unit tests only.

Protected Methods

Method Description
generateContentDigest ( Response $response ) : string Injects eZ Publish specific information in the content digest if needed.

Private Methods

Method Description
purgeLocation ( $locationId ) : boolean Purges cache for $locationId.

Method Details

generateContentDigest() protected method

X-Location-Id response header is set in the ViewController.
See also: eZ\Publish\Core\MVC\Symfony\Controller\Content\ViewController::viewLocation()
protected generateContentDigest ( Response $response ) : string
$response Symfony\Component\HttpFoundation\Response
return string

getFilesystem() public method

public getFilesystem ( ) : Symfony\Component\Filesystem\Filesystem
return Symfony\Component\Filesystem\Filesystem

getLocationCacheDir() public method

This method is public only for unit tests. Use it only if you know what you are doing.
public getLocationCacheDir ( integer $locationId = null ) : string
$locationId integer
return string

getLocationCacheLockName() public method

This method is public only for unit tests. Use it only if you know what you are doing.
public getLocationCacheLockName ( $locationId = null ) : string
return string

getPath() public method

Will detect if $key is eZ Publish specific.
public getPath ( string $key ) : string
$key string
return string

purgeAllContent() public method

Purges all cached content.
public purgeAllContent ( ) : boolean
return boolean

purgeByRequest() public method

If X-Location-Id or X-Group-Location-Id header is present, the store will purge cache for given locationId or group of locationIds. If not, regular purge by URI will occur.
public purgeByRequest ( Request $request ) : boolean
$request Symfony\Component\HttpFoundation\Request
return boolean True if purge was successful. False otherwise

setFilesystem() public method

Injects a Filesystem instance For unit tests only.
public setFilesystem ( Symfony\Component\Filesystem\Filesystem $fs )
$fs Symfony\Component\Filesystem\Filesystem