Open mattstudio opened 8 years ago
The default cache-control is set to max-age=604800 (one week). How can I change this? (Apart from editing file.py)
Ideally, my html pages would have a max-age=0, while images, css, and javascript would have a max-age= a month or something.
Any ideas how this could be done? Is there a way to specify this on each page? Or in some sort of plugin?
+1
It seems that one can create a plugin like that
def preDeployFile(file): cache_expiration = 60 * 60 # One hour if file.path.endswith('.html'): file.cache_control = cache_expiration
The default cache-control is set to max-age=604800 (one week). How can I change this? (Apart from editing file.py)
Ideally, my html pages would have a max-age=0, while images, css, and javascript would have a max-age= a month or something.
Any ideas how this could be done? Is there a way to specify this on each page? Or in some sort of plugin?