Skip to main content

Plone viewlet for purging varnish cache for given url.

Project description

====================
stxnext.varnishpurger
====================

Overview
========

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


Installation
============

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.::

[buildout]
...
eggs =
...
stxnext.varnishpurger

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

[instance]
recipe = plone.recipe.zope2instance
...
zcml =
...
stxnext.varnishpurger


* 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.

Usage
=====

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";
return(lookup);
}

...

}

References
==========

.. varnish: http://varnish.projects.linpro.no/
.. Plone: http://plone.org



Author & Contact
================

:Author:
* Radosław Jankiewicz <``radoslaw.jankiewicz@stxnext.pl``>
* Wojciech Lichota <``wojciech.lichota@stxnext.pl``>
* Marcin Ossowski <``marcin.ossowski@stxnext.pl``>

.. image:: http://stxnext.pl/open-source/files/stx-next-logo

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

http://stxnext.pl

info@stxnext.pl
Changelog
=========

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.

Source Distribution

stxnext.varnishpurger-0.1.1.tar.gz (10.7 kB view details)

Uploaded Source

File details

Details for the file stxnext.varnishpurger-0.1.1.tar.gz.

File metadata

File hashes

Hashes for stxnext.varnishpurger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 550f62818e2f39d7246d6285634c9837e0e81393524e5f46001fc2d2666f1a3d
MD5 f76cc1c8efd273f0684f02b61b26f78a
BLAKE2b-256 30327830803e544cafd11ba396ac4b6842fb1c139a055ff936d23470282ceb95

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page