Skip to main content

Refresh, Cache, and Offline Behavior

The add-in separates dataset definitions from dataset results.

The add-in separates dataset definitions from dataset results.

Dataset definitions are stored in the workbook. Result data is also cached in the workbook after refresh.

Result Cache

When a dataset is refreshed, the add-in stores the result in the workbook cache.

The cache is keyed by:

  • Connection identity

  • Semantic layer

  • Generated query

  • Parameter and variable variant

This means one dataset can have multiple cached results when formulas use different parameter or variable values.

Refreshing Dataset Variants

If a workbook contains these formulas:

=ASTRATO.TABLE("Sales", ASTRATO.PARAMETER("Factor", 2))
=ASTRATO.TABLE("Sales", ASTRATO.PARAMETER("Factor", 3))

The add-in treats them as two variants of the same dataset.

Refreshing the dataset updates both variants when both are known in the workbook.

Semantic Layer Cache

The semantic layer schema is cached in memory per connection and semantic layer.

The cache is not saved to the workbook. Closing and reopening the add-in or Excel clears it.

When you open a dataset:

  1. If the semantic layer is already cached, the property panel uses it immediately.

  2. The add-in refreshes the semantic layer in the background.

  3. If the semantic layer changed, the property panel receives the updated fields.

Dataset queries also reuse the in-memory semantic layer cache, so the add-in does not fetch the semantic layer before every query.

Identity Check

The add-in caches a successful connection identity check for 15 minutes.

The identity check runs again after the cache expires, or when the connection is used after restarting the add-in or Excel.

The add-in also forces a new identity check whenever another Astrato request returns an authentication or permission error. This separates expired credentials from missing access to a semantic layer or its data.

Offline Mode

If the identity check confirms that the OAuth login or PAT is invalid, the connection is marked offline for the current add-in session.

If the identity check succeeds, the connection remains online. The failed request is shown as a data-access problem, with guidance to open Astrato and request the required permissions.

If the identity service cannot be reached temporarily, the connection remains retryable instead of being marked offline.

While a connection is offline:

  • The add-in does not keep refreshing the semantic layer in the background.

  • Dataset formulas can still return persisted cached results.

  • ASTRATO.TABLE returns cached data if a matching cached result exists.

  • If no matching cached result exists, the formula returns no data.

Offline state is in memory only. Closing and reopening the add-in or Excel clears it.

Update Modes

Dataset update modes affect when data is fetched:

  • Off: use cached data only.

  • On request: fetch when needed and no matching cached result exists.

  • Live: allow live fetching during recalculation.

For shared workbooks, Off is useful when recipients should see cached data without using your connection.

Did this answer your question?