Class

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

class LocationAwareStore extends Store implements ContentPurger

LocationAwareStore implements all the logic for storing cache metadata regarding locations.

Constants

LOCATION_CACHE_DIR

LOCATION_STALE_CACHE_DIR

Methods

setFilesystem(Filesystem $fs)

Injects a Filesystem instance For unit tests only.

Filesystem getFilesystem()

string getPath(string $key)

Returns the right path where cache is being stored.

bool purgeByRequest(Request $request)

Purges data from $request.

bool purgeAllContent()

Purges all cached content.

string getLocationCacheLockName($locationId = null)

Returns cache lock name for $locationId.

string getLocationCacheDir($locationId = null)

Returns cache dir for $locationId.

Details

at line 40
public setFilesystem(Filesystem $fs)

Injects a Filesystem instance For unit tests only.

Parameters

Filesystem $fs

at line 48
public Filesystem getFilesystem()

Return Value

Filesystem

at line 85
public string getPath(string $key)

Returns the right path where cache is being stored.

Will detect if $key is eZ Publish specific.

Parameters

string $key

Return Value

string

at line 133
public bool purgeByRequest(Request $request)

Purges data from $request.

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.

Parameters

Request $request

Return Value

bool True if purge was successful. False otherwise

at line 172
public bool purgeAllContent()

Purges all cached content.

Return Value

bool

at line 229
public string getLocationCacheLockName($locationId = null)

Returns cache lock name for $locationId.

This method is public only for unit tests. Use it only if you know what you are doing.

Parameters

$locationId

Return Value

string

at line 248
public string getLocationCacheDir($locationId = null)

Returns cache dir for $locationId.

This method is public only for unit tests. Use it only if you know what you are doing.

Parameters

$locationId

Return Value

string