Esi
class Esi implements SurrogateInterface
Esi implements the ESI capabilities to Request and Response instances.
For more information, read the following W3C notes:
ESI Language Specification 1.0 (http://www.w3.org/TR/esi-lang)
Edge Architecture Specification (http://www.w3.org/TR/edge-arch)
Methods
Constructor.
Returns surrogate name.
Returns a new cache strategy instance.
Adds HTTP headers to specify that the Response needs to be parsed for ESI.
Renders an ESI tag.
Details
at line line 43
__construct(array $contentTypes = array('text/html', 'text/xml', 'application/xhtml+xml', 'application/xml'))
Constructor.
at line line 48
string
getName()
Returns surrogate name.
at line line 58
ResponseCacheStrategyInterface
createCacheStrategy()
Returns a new cache strategy instance.
at line line 70
bool
hasSurrogateCapability(Request $request)
Checks that at least one surrogate has ESI/1.0 capability.
at line line 84
addSurrogateCapability(Request $request)
Adds ESI/1.0 capability to the given Request.
at line line 99
addSurrogateControl(Response $response)
Adds HTTP headers to specify that the Response needs to be parsed for ESI.
This method only adds an ESI HTTP header if the Response has some ESI tags.
at line line 113
bool
needsParsing(Response $response)
Checks that the Response needs to be parsed for ESI tags.
at line line 132
string
renderIncludeTag(string $uri, string $alt = null, bool $ignoreErrors = true, string $comment = '')
Renders an ESI tag.
at line line 155
Response
process(Request $request, Response $response)
Replaces a Response ESI tags with the included resource content.
at line line 227
string
handle(HttpCache $cache, string $uri, string $alt, bool $ignoreErrors)
Handles an ESI from the cache.