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. |
||
| Boolean|string |
lock(Request $request)
Locks the cache for a given Request. |
|
| Boolean |
unlock(Request $request)
Releases the lock for the given Request. |
|
| Boolean |
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. |
||
| Boolean |
purge(string $url)
Purges data for the given URL. |
|
| getPath($key) |
Details
at line 36
public
__construct(string $root)
Constructor.
at line 49
public
cleanup()
Cleanups storage.
at line 72
public Boolean|string
lock(Request $request)
Locks the cache for a given Request.
at line 98
public Boolean
unlock(Request $request)
Releases the lock for the given Request.
at line 105
public Boolean
isLocked(Request $request)
Returns whether or not a lock exists.
at line 117
public Response|null
lookup(Request $request)
Locates a cached Response for the Request provided.
at line 163
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.
at line 227
public
invalidate(Request $request)
Invalidates all cache entries that match the request.
at line 313
public Boolean
purge(string $url)
Purges data for the given URL.