brucemcpherson / desktopliberation

hosting for desktop liberation google plus community
30 stars 1 forks source link

SuperFetch caching: How does it work? #143

Open brucemcpherson opened 2 years ago

brucemcpherson commented 2 years ago

Apps Script provides a caching service that’s pretty fast – usually faster than accessing the source data. More importantly there aren’t rate limits or usage charges – so if you’re using an API with such charges or disruptive rate limits (like the Twitter or Git API for example), you should keep API fetches to a minimum.

Caching limitations First of all the Apps Script Caching service has a size limit of 100k per entry – which is not a lot. Secondly you can’t easily know if data is stale, especially if you have multiple instances of the script running.

This article describes how SuperFetch handles these limitations to get the most out of caching. https://ramblings.mcpher.com/apps-script/superfetch-proxy/caching-how/