interface StoreInterface
Interface implemented by HTTP cache stores.
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|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. | |
bool | purge(string $url) Purges data for the given URL. | |
cleanup() Cleanups storage. |
Locates a cached Response for the Request provided.
Request | $request |
Response|null | A Response instance, or null if no cache entry was found |
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.
Request | $request | |
Response | $response |
string | The key under which the response is stored |
Invalidates all cache entries that match the request.
Request | $request |
Locks the cache for a given Request.
Request | $request |
bool|string | true if the lock is acquired, the path to the current lock otherwise |
Releases the lock for the given Request.
Request | $request |
bool | False if the lock file does not exist or cannot be unlocked, true otherwise |
Returns whether or not a lock exists.
Request | $request |
bool | true if lock exists, false otherwise |
Purges data for the given URL.
string | $url | A URL |
bool | true if the URL exists and has been purged, false otherwise |
Cleanups storage.
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/HttpCache/StoreInterface.html