In pset7 code in application.py there is this snippet of code:
if app.config["DEBUG"]:
@app.after_request
def after_request(response):
help(response.headers)
response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
response.headers["Expires"] = 0
response.headers["Pragma"] = "no-cache"
return response
I already know that this function is called everytime the server responses to the client's computer. And this function changes the header of the response object but...
1) In the documentation that i found:(http://werkzeug.pocoo.org/docs/0.12/datastructures/#werkzeug.datastructures.Headers) there is nothing about this keywords: "Cache-Control", "Expires" or "Pragma". Where can i find a full list of this keywords?
2) The cache is a some data that computer uses a lot, but how can i the server change or handle the cache of my client? Isn't that strange? What exactly does that function do to my client's cache?