Hi,
If you use plone.app.caching you can configure which servers (varnish or
others) have to be pinged with the PURGE method so that they invalidate
the pages cached for that specific object.
> b) if I change a newsitem that affects my portal page, plone sends the
> invalidation for the newsitem, and it sends the invalidation for the
> portal page affected as well?
Hopefully someone else will reply on that.
Cheers,
> _______________________________________________
> Setup mailing list
> Se...@lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-setup
--
Gil Forcada
[ca] guifi.net - una xarxa lliure que no para de créixer
[en] guifi.net - a non-stopping free network
bloc: http://gil.badall.net
planet: http://planet.guifi.net
_______________________________________________
Setup mailing list
Se...@lists.plone.org
https://lists.plone.org/mailman/listinfo/plone-setup
b) if I change a newsitem that affects my portal page, plone sends the invalidation for the newsitem, and it sends the invalidation for the portal page affected as well?
No, it'll only invalidate that one page and normal ttls will take place for the portal page.b) if I change a newsitem that affects my portal page, plone sends the invalidation for the newsitem, and it sends the invalidation for the portal page affected as well?
We've implemented our own manual purge method to address situations like this.
I tried to come up with a generic solution involving headers
(http://svn.plone.org/svn/collective/experimental.depends/trunk/README.txt)
but I think it's pretty much impossible as there is no easy way to know
where a link to a page might turn up (in a navigation tree or listing).
I do think adding headers with the portal type and any portlets could be
useful - this would allow you to write Varnish VCL that bans pages which are
a Collection or contain a Collection portlet.
> If it's not too expensive you can simply purge the whole Varnish at once
> on every Plone edit:
>
> http://opensourcehacker.com/2011/09/08/purge-varnish-cache-from-python-web-application/
>
> Suitable for low edit volume sites.
>
For these types of sites, I configure Varnish to ban all pages with a
Content-Type of text/html in addition to the subject of the PURGE request
itself:
if (req.request == "PURGE") {
if (req.http.X-Real-IP != "127.0.0.1") {
error 405 "Not allowed.";
}
purge("obj.http.host == " req.http.host " && obj.url == " req.url);
purge("obj.http.Content-Type ~ ^text/html");
error 200 "Purged";
}
Laurence
--
View this message in context: http://plone.293351.n2.nabble.com/Doubt-about-plone-caching-varnish-tp7291445p7297254.html
Sent from the Installation, Setup, Upgrades mailing list archive at Nabble.com.