Articles on: Content Management

How content caching works

Two years ago we released a new spreadsheet caching mechanism. That update allowed us to increase the loading speed up to 2-5 times faster (depending on the number of rows and user location) and to improve the performance, especially for websites with a big amount of data.

Since the mechanism runs in the background its work may not always be obvious. That’s why we decided to create this article to answer all your questions on content caching.


How does it work for SpreadSimple websites?



Every time a visitor enters a website (or refreshes the page), a cached version of the website is loaded. At the same time, in the background, there is a request to clear the cached data and to load the new data if there is any. The cache is not cleared more than once a minute if there are several requests for that very website.

This way the first visitor that loads a page after the Google Sheets content is updated causes clearing the cache for all visitors of this website and upon the next request (website visit) the new data will be displayed (for all the users). That's why when you check the data immediately after updating the google sheet, you see the cached data, but the next page refresh done in a minute or so (not necessarily by you) loads the updated data from your Sheets.


How can I synchronize the sheet with the website/reload the spreadsheet to see the changes on website after editing the Sheet?



You don't need to force the "reloading" of the spreadsheet, the data on the website is updated automatically. Since each website visit updates the cache and uses the data already cached, you can see the changes after refreshing it if no one has visited the website in the meantime. And for websites with regular traffic, it will be almost a real-time update.
Also you can republish your website in the website editor to update the cache.


Can I disable it? Can I control the cache mechanism?



No, it’s not possible to change the cache mechanism settings. It works the same for all the websites.


How often is the cache updated?



It is updated every time there is a website query (someone visits the website). Also, every Republish makes the cache purge (update).


Is there any mechanism to build the first-time cache?



The first-time cache is built automatically by default.

Updated on: 06/03/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!