Skip to main content

Plone viewlet for purging varnish cache for given url.

Project description



Viewlet containing linkt to perform action of purging varnish cache
for actual object's views.


If you are using zc.buildout to manage your project, you can do this:

* Add ``stxnext.varnishpurger`` to the list of eggs to install, e.g.::

eggs =

* If you're using plone.recipe.zope2instance recipe to manage your
instance add this lines to install a ZCML slug:

recipe = plone.recipe.zope2instance
zcml =

* Re-run buildout, e.g. with::

$ ./bin/buildout

You can skip the ZCML slug if you are going to explicitly include the package
from another package's configure.zcml file.

Finally go to portal_setup and import steps for stxnext.varnishpurger profile.


After installation one new viewlet above object's content will be displayed.
The viewlet contains a link to purge content of actual url from varnish cache.
In site properties there is additional configuration for varnish url and
domains to be purged.

The varnish configuration file should contain customized vcl_recv subroutine
to purge given object by it's UID.

sub vcl_recv {


if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
purge("obj.http.X-Context-Uid ~ " req.url);
error 200 "Purged";




.. varnish:
.. Plone:

Author & Contact

* Radosław Jankiewicz <````>
* Wojciech Lichota <````>
* Marcin Ossowski <````>

.. image::

**STX Next** Sp. z o.o.

0.1.1 [2010-05-24]

* Fixed setting UID in http header for FSPageTemplate views [radekj]

0.1.0 [2010-05-13]

* Initial release [radekj]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stxnext.varnishpurger, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size stxnext.varnishpurger-0.1.1.tar.gz (10.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page