Add no-cache as a response header.

This commit is contained in:
yackob03 2014-01-02 18:01:34 -05:00
parent 8342dfcccf
commit 8e4bbdf1dd
2 changed files with 25 additions and 6 deletions

View file

@ -10,3 +10,12 @@ def cache_control(max_age=55):
return response
return add_max_age
return wrap
def no_cache(f):
@wraps(f)
def add_no_cache(*args, **kwargs):
response = f(*args, **kwargs)
response.headers['Cache-Control'] = 'no-cache'
return response
return add_no_cache