Message-ID: <1198764341.4008.1485856322422.JavaMail.confluence@ip-10-127-227-164> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_4007_437262653.1485856322422" ------=_Part_4007_437262653.1485856322422 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This explains the content cache purge =
;mechanism, while publishing content from the admin interface or from a con=
tainer aware script (will not work with pure eZScript
&nbs=
p;atm, but will with new CLI scripts).
Note that the approach is fully c=
ompatible with native reverse proxies like Varnish&nb=
sp;(but in this case you won't use all HttpCache
rel=
ated code).
On publish, one or several Http PURGE requests are sent to the backend. =
This request will have a specific header X-Location-Id
&nb=
sp;(in the case of 1 request per location to purge) or X-Group-L=
ocation-Id
(in the case of 1 request for all location to purge)=
.
By default, PURGE requests will be emulated and sent to the cache Store.=
Cache purge will thus be synchronous.
This is the default behavior.&nbs=
p;No Http requests will be sent to the backend when publishing.
Configuration:
ezpublish: http_cache: purge_type: local=20
Only one Http PURGE request is sent for purging every needed locations.<= /p>
A request for purging locations 123
and
PURGE / HTTP 1.1
Host: localhost
X-Group-Location-Id: 12=
3; 456
Configuration
ezpublish: http_cache: purge_type: single_http=20
One Http PURGE request will be sent per location to purge<= /p>
A request for purging locations 123
and
PURGE / HTTP 1.1
Host: localhost
X-Location-Id: 123
AND
PURGE / HTTP 1.1
Host: localhost
X-Location-Id: 456
Configuration:
ezpublish: http_cache: purge_type: multiple_http=20
When purging all cached content, a single Http PURGE request is sent (ex=
cept for local purge type), withX-Location-Id set to
*
:
PURGE / HTTP 1.1
Host: localhost
X-Location-Id: *
If you need to purge several servers at once (e.g. multiple Varnish infr= astructure), you can set this up in the siteaccess configuration:
ezpublish: http_cache: purge_type: single_http system: my_siteacess: http_cache: purge_servers: ["http://varnish.server1", "http://varnish.s= erver2", "http://varnish.server3"]=20
Manual purging is also possible:
$locationIds =3D array( 123, 456 ); $container->get( 'ezpublish.http_cache.purger' )->purge( $locationIds= );=20