Skip to main content

stxnext.varnishpurger

Overview

A viewlet containing the link 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_quickinstaller and install stxnext.varnishpurger product.

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 where you can define the address of varnish instance url (by default: localhost:6081).

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);
   }

    ...

}

Tested With

Plone 3, Plone 4 and Varnish 2.1.x

Source

http://svn.plone.org/svn/collective/stxnext.varnishpurger/trunk

References

varnish: http://www.varnish-cache.org

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>

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

STX Next Sp. z o.o.

http://stxnext.pl

info@stxnext.pl

Changelog

0.3.0 (2011-12-08)

  • Link for executing purging action moved from a viewlet to the ‘Actions’ dropdown [radekj]

0.2.0 (2011-11-03)

  • Fixes to work with Plone 4.1 [radekj]

0.1.2 (2011-05-13)

  • Moved to collective svn, updated docs [radekj]

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]

Metadata

Release files for stxnext.varnishpurger 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stxnext.varnishpurger 0.3.0
File Size Uploaded Provenance
stxnext.varnishpurger-0.3.0.tar.gz 9.2 kB Without provenance Details

Release files / stxnext.varnishpurger-0.3.0.tar.gz

Download URL stxnext.varnishpurger-0.3.0.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
58cefc7fc65c12dda6f426bcad0b1fb7d2fa5e5792de5f890289321e0684448f
BLAKE2b-256 checksum
How to use checksums
be8b16ba69cb0dffbc562d8f93cdb6679007079be7a73f8f8872cc8d33f2b52f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for stxnext.varnishpurger 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page