def vary_on_cookie(func):
 def inner_func(*args, **kwargs):
  response = func(*args, **kwargs)
  patch_vary_headers(response, ('Cookie',))
  return response
 return inner_func

def vary_on_cookie ( func ) : def inner_func ( * args , ** kwargs ) : response = func ( * args , ** kwargs ) patch_vary_headers ( response , ( 'Cookie' , ) ) return response return inner_func
a view decorator that adds "cookie" to the vary header of a response .