Class CacheDirectives
A REST API request options helper providing cache control features. This is similar to the Preconditions class, but applies inverse logic.
Class CacheDirectives
- Gedcomx\Rs\Client\Options\CacheDirectives implements Gedcomx\Rs\Client\Options\StateTransitionOption
Package: Gedcomx\Rs\Client\Options
Located at Rs/Client/Options/CacheDirectives.php
Methods summary
public
|
#
__construct(
Constructs a cache directives class using the specified state. If the ETag (entity tag) specified here does not match the server's ETag for a resource, the resource will be returned; otherwise, a not-modified status is returned. The same applies to last modified. If the server's last modified date for a resource is greater than the last modified specified here, the resource will be returned; otherwise, a not-modified status is returned. |
public
GuzzleHttp\Psr7\Request
|
#
apply( GuzzleHttp\Psr7\Request $request, GuzzleHttp\Psr7\Request $request,… )
Applies the ETag or last modified cache control headers to the specified REST API request. If the ETag (entity tag) specified here does not match the server's ETag for a resource, the resource will be returned; otherwise, a not-modified status is returned. The same applies to last modified. If the server's last modified date for a resource is greater than the last modified specified here, the resource will be returned; otherwise, a not-modified status is returned. |