def never_cache(view_func):
 @wraps(view_func)
 def _wrapped_view_func(request, *args, **kwargs):
  response = view_func(request, *args, **kwargs)
  add_never_cache_headers(response)
  return response
 return _wrapped_view_func

def never_cache ( view_func ) : @ wraps ( view_func ) def _wrapped_view_func ( request , * args , ** kwargs ) : response = view_func ( request , * args , ** kwargs ) add_never_cache_headers ( response ) return response return _wrapped_view_func
decorator that adds headers to a response so that it will never be cached .