Skip to content
HOW TO

Cache Intermediate Data

Goal

Cache expensive or reused intermediate data in a workbook workflow.

Prerequisites

  • A repeated or expensive intermediate array worth keeping in add-in memory.
  • A cache key naming convention, unless the cache will be read once inside a nested formula.

Steps

1. Choose a cache key that is unique to the workbook workflow.

2. Cache the expensive source range under that key.

=U.CACHE(B7:I20,M60)

3. Pass the cache key to downstream U functions, or retrieve its content for native Excel formulas.

=U.GET(M60)

4. Set an expiry only after reviewing the staleness risk for the workflow.

Result

Downstream U functions reuse the cached data by key without redisplaying or recomputing the full source range.

Common Variations

  • Omit the key for a read-once cache consumed by the next nested U function.
  • Filter pages while caching a multi-page report.
  • Set an expiry for data that must age out automatically.

Troubleshooting

  • Native Excel functions cannot read a cache key directly; retrieve the data with U.GET first.
  • A named cache persists until overwritten, removed, expired, or the Excel instance closes.
  • If freshness is unclear, display the cache result and its update trigger separately.