[master] 299d2da Force lookup of kss resources and fix cached creation of objects in Plone

Tollef Fog Heen tfheen at varnish-cache.org
Thu Jan 19 12:32:45 CET 2012


commit 299d2da0d94cae74efce9f46dd5f5d0d654fe348
Author: Cleber J Santos <cleber at cleberjsantos.com.br>
Date:   Wed Jan 18 11:46:03 2012 -0200

    Force lookup of kss resources and fix cached creation of objects in Plone

diff --git a/etc/zope-plone.vcl b/etc/zope-plone.vcl
index b69f583..263e343 100644
--- a/etc/zope-plone.vcl
+++ b/etc/zope-plone.vcl
@@ -52,13 +52,18 @@ sub vcl_recv {
                         }
                         return(lookup);
                 }
+
+                # Do not cache the creation of objects in Plone
+                if (req.url ~ "createObject"){
+                        return(pass);
+                }
         }
 
         # Don't cache authenticated requests
         if (req.http.Cookie && req.http.Cookie ~ "__ac(|_(name|password|persistent))=") {
 
 		# Force lookup of specific urls unlikely to need protection
-		if (req.url ~ "\.(js|css)") {
+		if (req.url ~ "\.(js|css|kss)") {
                         remove req.http.cookie;
                         return(lookup);
                 }



More information about the varnish-commit mailing list