Over the last few weeks, we've had reports from several customers that when they edited a file in the File Library, they weren't seeing the updated file. Sometimes they would see it if they hard-refreshed or cleared their browser cache or used a different browser, but not always.
As the old saying goes:
There are only two hard things in Computer Science: cache invalidation and naming things.
First of all, thank you to the customers who reported this--we know this was an unpleasant issue to run into, and it was a hard one for our team to reproduce and identify root cause on. We appreciate your patience as we worked on this!
We've made some changes to how these files are cached:
- We've decreased our default cache expiration from 10 days to 10 minutes.
- A hard refresh (Ctrl + F5 on Windows; Command + Shift + R on Mac) during that initial 10-minute window should show you the updated file. This applies in the live knowledge base as well as in the File Library thumbnail view.
- Even without a hard refresh, you should never see a file take longer than 10 minutes to update after you've uploaded a new one to the File Library--regardless of your browser's caching settings.
- Once you've updated a file, we prevent caching for a couple hours.
This way, if you continue to make tweaks to the file, the 10-minute caching rule won't apply--the new change will appear as soon as someone navigates away and back to viewing the file or refreshes the page. (So if you're like me and you update a screenshot and then realize you forgot an arrow or callout...we've got you covered.)
- You don't need to change any settings to see these changes take effect; they're already there.
For those of you who want a deeper understanding of what was going on, here's a quick summary:
This issue was due to two different factors:
- The default cache expiration setting we were using (10 days)
- The fact that caching could occur in multiple places:
- within the browser you're using
- within Cloudfront, the file storage solution underpinning File Library
When the caching was in the browser, a hard refresh (Ctrl + F5) or clearing the browser cache was enough to fix it.
But when the 10-day cache hadn't been properly busted in Cloudfront, no amount of updating your browser would show the updated file, because Cloudfront itself still thought the file hadn't been updated.
We hadn't made any recent changes to the caching process, but we have been updating various parts of our infrastructure over the last 1.5 years, and we think one or more of these updates subtly changed the way the cache expiration was being reset (or not) when files were updated.
Cache invalidation is a notoriously tricky issue to work on, and we may fine-tune some of these settings in the coming weeks, but so far in our testing these changes seem to have resolved the issues we'd been seeing reports on. Please contact us if you do still see any issues with files taking longer than 10 minutes to update.