Open smalers opened 3 years ago
See this Stack Overflow article, which indicates that the default cache expiration is 3600 seconds. I am familiar with using CloudFront on AWS, which allows invalidation after uploading files. OIT set up a load balancer for OpenCDSS. Based on information provided about that, it looks like load balancing has been implemented without Cloud CDN. Therefore, I don't think it is possible to invalidate the cloud storage files immediately after uploading. Keep this open in case a full CDN is implemented.
Mikhail from OIT suggested adding the following header to files. That makes sense for some top-level index.html
files that are "manually" created. I'll give it a try when I do updates.
Cache-Control:no-cache, max-age=0"
Actually, I had already tried such things. I think the problem is not the browser caching, it is that once a file is uploaded to GCP storage, there is a latency (default of 3600 seconds) in that version being publicly visible, due to internal caching in the GCP stack. This problem may not be resolved unless a CDN is implemented. Keep open as a placeholder. Maybe the State will implement a CDN for the OpenCDSS bucket and then files can be invalidated.
Uploading the MkDocs-generated website to the Google Cloud Platform files results in a latency. Browsers that have the website cached do not show the new content for awhile. And, sometimes viewing the website in an incognito window shows an incomplete website. There should be a way to "invalidate" the files so that the Google services refresh the cache and people see the latest content. This will require research of Google web services. I'm not sure if this is something I should do under OpenCDSS and if so how high a priority it is. It could be simple to resolve or take some time to do the research.