[master] 4c20c84 storage and hash control attributes should also be writable

Nils Goroll nils.goroll at uplex.de
Wed Nov 8 07:31:06 UTC 2017


commit 4c20c843ade51c30ec98a910f3da4a78ec464513
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Nov 8 08:14:51 2017 +0100

    storage and hash control attributes should also be writable
    
    Afterthought on #2405:
    
    The usage pattern we want to get to is (pseudo vcl, don't take
    the syntax for granted)
    
    	sub vcl_whatever_client_sub {
    		std.rollback(req);
    		set req.<whatever>;
    		...
    		return (restart);
    	}
    
    The hash and storage controls should be no exception

diff --git a/doc/changes.rst b/doc/changes.rst
index f96778a..d900b93 100644
--- a/doc/changes.rst
+++ b/doc/changes.rst
@@ -10,6 +10,10 @@ Varnish Cache Trunk (ongoing)
   Restarts now leave all the request properties in place except for
   ``req.restarts`` and ``req.xid``, which need to change by design.
 
+* ``req.storage``, ``req.hash_ignore_busy`` and
+  ``req.hash_always_miss`` are now accessible from all of the client
+  side subs, not just ``vcl_recv{}``
+
 ================================
 Varnish Cache 5.2.0 (2017-09-15)
 ================================
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index ee7d00e..524e4b3 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -271,7 +271,7 @@ sp_variables = [
 	('req.storage',
 		'STEVEDORE',
 		('client',),
-		('recv',), """
+		('client',), """
 		The storage backend to use to save this request body.
 		"""
 	),
@@ -335,7 +335,7 @@ sp_variables = [
 	('req.hash_ignore_busy',
 		'BOOL',
 		('client',),
-		('recv',), """
+		('client',), """
 		Ignore any busy object during cache lookup. You
 		would want to do this if you have two server looking
 		up content from each other to avoid potential deadlocks.
@@ -344,7 +344,7 @@ sp_variables = [
 	('req.hash_always_miss',
 		'BOOL',
 		('client',),
-		('recv',), """
+		('client',), """
 		Force a cache miss for this request. If set to true
 		Varnish will disregard any existing objects and
 		always (re)fetch from the backend.


More information about the varnish-commit mailing list