interface SurrogateInterface
string | getName() Returns surrogate name. | |
ResponseCacheStrategyInterface | createCacheStrategy() Returns a new cache strategy instance. | |
bool | hasSurrogateCapability(Request $request) Checks that at least one surrogate has Surrogate capability. | |
addSurrogateCapability(Request $request) Adds Surrogate-capability to the given Request. | ||
addSurrogateControl(Response $response) Adds HTTP headers to specify that the Response needs to be parsed for Surrogate. | ||
bool | needsParsing(Response $response) Checks that the Response needs to be parsed for Surrogate tags. | |
string | renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '') Renders a Surrogate tag. | |
Response | process(Request $request, Response $response) Replaces a Response Surrogate tags with the included resource content. | |
string | handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors) Handles a Surrogate from the cache. |
Returns surrogate name.
string |
Returns a new cache strategy instance.
ResponseCacheStrategyInterface | A ResponseCacheStrategyInterface instance |
Checks that at least one surrogate has Surrogate capability.
Request | $request |
bool | true if one surrogate has Surrogate capability, false otherwise |
Adds Surrogate-capability to the given Request.
Request | $request |
Adds HTTP headers to specify that the Response needs to be parsed for Surrogate.
This method only adds an Surrogate HTTP header if the Response has some Surrogate tags.
Response | $response |
Checks that the Response needs to be parsed for Surrogate tags.
Response | $response |
bool | true if the Response needs to be parsed, false otherwise |
Renders a Surrogate tag.
string | $uri | A URI |
string | $alt | An alternate URI |
bool | $ignoreErrors | Whether to ignore errors or not |
string | $comment | A comment to add as an esi:include tag |
string |
Replaces a Response Surrogate tags with the included resource content.
Request | $request | |
Response | $response |
Response |
Handles a Surrogate from the cache.
HttpCache | $cache | An HttpCache instance |
string | $uri | The main URI |
string | $alt | An alternative URI |
bool | $ignoreErrors | Whether to ignore errors or not |
string |
RuntimeException | |
Exception |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/HttpKernel/HttpCache/SurrogateInterface.html