HttpCache\Store (Component\HttpKernel)
Symfony\Component\HttpKernel\HttpCache\Store
class Store implements StoreInterface
Store implements all the logic for storing cache metadata (Request and Response headers).
Methods
__construct(string $root) Constructor. | ||
cleanup() Cleanups storage. | ||
bool|string | lock(Request $request) Locks the cache for a given Request. | |
bool | unlock(Request $request) Releases the lock for the given Request. | |
bool | isLocked(Request $request) Returns whether or not a lock exists. | |
Response|null | lookup(Request $request) Locates a cached Response for the Request provided. | |
string | write(Request $request, Response $response) Writes a cache entry to the store for the given Request and Response. | |
invalidate(Request $request) Invalidates all cache entries that match the request. | ||
bool | purge(string $url) Purges data for the given URL. | |
getPath($key) |
Details
public __construct(string $root)
Constructor.
public cleanup()
Cleanups storage.
public bool|string lock(Request $request)
Locks the cache for a given Request.
public bool unlock(Request $request)
Releases the lock for the given Request.
public bool isLocked(Request $request)
Returns whether or not a lock exists.
public Response|null lookup(Request $request)
Locates a cached Response for the Request provided.
public string write(Request $request, Response $response)
Writes a cache entry to the store for the given Request and Response.
Existing entries are read and any that match the response are removed. This method calls write with the new list of cache entries.
public invalidate(Request $request)
Invalidates all cache entries that match the request.
public bool purge(string $url)
Purges data for the given URL.
public getPath($key)
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Component/HttpKernel/HttpCache/Store.html