def vary_on_headers(*headers):
 def decorator(func):
  def inner_func(*args, **kwargs):
   response = func(*args, **kwargs)
   patch_vary_headers(response, headers)
   return response
  return wraps(func, assigned=available_attrs(func))(inner_func)
 return decorator

def vary_on_headers ( * headers ) : def decorator ( func ) : def inner_func ( * args , ** kwargs ) : response = func ( * args , ** kwargs ) patch_vary_headers ( response , headers ) return response return wraps ( func , assigned = available_attrs ( func ) ) ( inner_func ) return decorator
a view decorator that adds the specified headers to the vary header of the response .