I'm inquiring on Flask and was wondering what are the default values for things such as cache-control. I can't find information on any HTTP headers. Maybe I'm mistaken and it's the server software who takes care of this part. Thanks
Asked
Active
Viewed 227 times
1 Answers
1
For your first question about Caching: As Flask docs state
Flask itself does not provide caching for you, but Flask-Caching, an extension for Flask does.
So you can use Flask-Caching if you want to do caching for your website.
For your second question about http headers:
You can use request
object to get different header values How to get http headers in flask? and use make_response to set custom headers.

Aditya
- 184
- 1
- 12
-
I thought Flask-caching was for server-side caching only. Not for instruction on caching for clients. – MusicAndCode Oct 22 '20 at 15:55
-
Maybe, actually I am not very good at caching topic and never tried it. So am not sure how exactly you can do it on client side. – Aditya Oct 23 '20 at 01:52