Closed jack89roberts closed 5 years ago
It's possible to set your http headers to control caching (including saying not to cache at all). I expect flask exposes a way to set this for a function called on a particular route.
f615dde: Disabled caching on download end-point by editing http headers in flask as per Martin's comment above.
PDF cropping issue was tricky to track down:
NB: Even though caching disabled the download end-point should now deliver the zip file ~immediately. This is because the pdfs and zip are generated as part of the update end-point now, rather than in the download end-point.
Working after the changes above.
The download link on the web-site was giving an error. I updated versions of the pdf conversion tool (wkhtmltopdf) in the web-app, and the expected zip file is now returned but the cropping of the pdf page doesn't seem to be working for the horizontal axis for some reason. Chrome also seems to do some kind of caching which means you get an older version of the files (you can tell something's wrong if you instantly get delivered the zip, as it should take some time to do the file conversion etc. in the background). On Safari this doesn't seem to happen.
For me everything works as expected if I run normally on my laptop, but I get the cropping issue if I run it in docker on a VM locally (or on Azure).