Caching API Data
Guide to API caching strategy in Wappler, focused on freshness, request cost, and page-versus-server ownership.
Caching API data is a freshness decision, not just a speed feature
Caching helps when repeated API calls are expensive, slow, or rate-limited, but it only works well when you are explicit about how stale the data is allowed to become. The important question is not whether caching exists. It is whether the user can tolerate seeing a recently cached result instead of a brand-new request every time.
A practical caching pattern starts with low-volatility or rate-limited data
Good early candidates include product catalogs from third-party feeds, location lists, exchange tables, or status endpoints that change on a schedule instead of every second. Those cases make the tradeoff obvious and let you choose cache settings confidently.
Choose whether the cache belongs in the page layer or the server layer
Some caching lives naturally in API Data Source because the page owns the request. Other cases belong in Server Connect because the server owns authentication, aggregation, or shared reuse across multiple pages. Matching the cache to the layer that owns the contract keeps the architecture easier to reason about.
Next steps
Use the related tours below to decide which layer should own the request and its cache settings.