ImportFromWeb caches the webpages it fetches so whenever Google Sheets refreshes the =IMPORTFROMWEB() functions, the content is retrieved from the cache and it is not counted as new requests.
The cache_lifespan option enables to overwrite and extend (or reduce) the default cache setting. You can define the time in hours, days or weeks during which you want to keep your data before it is fetched again. It helps you to control your credits usage when you do not need to update your data frequently.
The cache_lifespan option is set the 3d parameter into your =IMPORTFROMWEB() formulas.
You can use the cache_lifespan option by inputting the duration in hours, days or weeks and using different syntaxes like
10 hours or even just
Bear in mind that the function will not necessarily update directly after the cache expires but only when Google Sheets lets the function recalculate.
As any other options of IMPORTFROMWEB, there are 2 ways to call the cache_lifespan option:
=IMPORTFROMWEB(data_sources, selectors, "cache_lifespan:2 days")
|3||=IMPORTFROMWEB(data_sources, selectors, A1:B1)|
Alternatively, the cache can be set directly from the sidebar of the add-on:
Please note that the cache set in the sidebar applies to your current spreadsheet only.
Of course, whatever your cache setting is, you can always decide to update your data by re-executing the =IMPORTFROMWEB() functions from the sidebar. Select the cells that contain the formulas in your spreadsheet and press RUN from the “Monitor” tab.