interface StoreInterface
Interface implemented by HTTP cache stores.
Methods
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. |
Details
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.
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.
Please login to continue.