Plone视图插件,用于清除给定URL的varnish缓存。
项目描述
stxnext.varnishpurger
概述
包含执行实际对象视图的varnish缓存清除操作链接的视图插件。
安装
如果您使用zc.buildout管理项目,您可以这样做
将stxnext.varnishpurger添加到要安装的egg列表中,例如。
[buildout] ... eggs = ... stxnext.varnishpurger
如果您使用plone.recipe.zope2instance配方管理实例,请添加以下行以安装ZCMLslug。
[instance] recipe = plone.recipe.zope2instance ... zcml = ... stxnext.varnishpurger
重新运行buildout,例如使用。
$ ./bin/buildout
如果您将从另一个包的configure.zcml文件中显式包含包,则可以跳过ZCMLslug。
最后,转到portal_quickinstaller并安装stxnext.varnishpurger产品。
用法
安装后,将在对象内容上方显示一个新的视图插件。该视图插件包含一个链接,用于从varnish缓存中清除实际URL的内容。在站点属性中还有额外的配置,您可以在此处定义varnish实例URL的地址(默认:localhost:6081)。
varnish配置文件应包含自定义的vcl_recv子程序,通过其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); } ... }
测试过的版本
Plone 3、Plone 4和Varnish 2.1.x
源代码
http://svn.plone.org/svn/collective/stxnext.varnishpurger/trunk
参考
varnish: http://www.varnish-cache.org
Plone: http://plone.org
变更日志
0.3.0 (2011-12-08)
执行清除操作的链接从视图移至“操作”下拉菜单 [radekj]
0.2.0 (2011-11-03)
针对Plone 4.1的修复 [radekj]
0.1.2 (2011-05-13)
迁移至collective svn,更新文档 [radekj]
0.1.1 (2010-05-24)
修复在FSPageTemplate视图中设置http头UID的问题 [radekj]
0.1.0 (2010-05-13)
初始发布 [radekj]
项目详情
stxnext.varnishpurger-0.3.0.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 58cefc7fc65c12dda6f426bcad0b1fb7d2fa5e5792de5f890289321e0684448f |
|
MD5 | 3083030ca5858e40c9a270afbd7e80fe |
|
BLAKE2b-256 | be8b16ba69cb0dffbc562d8f93cdb6679007079be7a73f8f8872cc8d33f2b52f |