Add no-cache as a response header.
This commit is contained in:
parent
8342dfcccf
commit
8e4bbdf1dd
2 changed files with 25 additions and 6 deletions
|
@ -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
|
||||
|
|
Reference in a new issue