← All studio notes

Engineering & performance / DIJION

How fresh is cached data? A mobile freshness contract

A cache plan distinguishing data age from last validation, with offline display, account boundaries and refresh failures.

A cache can make a screen appear quickly without making its information current. In an illustrative task list, an outdated completion state can prompt the wrong action. Define acceptable staleness, display after failed refresh and which operations remain available on older data as product decisions rather than accidental consequences of storage.

Separate modification time from validation time

The record’s modification time, the app’s validation time and the local download time are distinct. Which does Updated just now describe? Align the label with its evidence. Treating a failed refresh attempt as a successful validation can make old data appear trustworthy for reasons the application has not actually established.

Choose policy according to the data

Scroll the table horizontally to see all columns.

Example freshness decisions
DataShowing older contentInformation needed
Reading contentMay be appropriateExplain the local copy
Shared task statusMay prompt an incorrect actionRefresh and conflict policies
Access decisionAn old grant may be insufficientCurrent authorization check

Distinguish HTTP caching from app storage

RFC 9111 defines HTTP response caching and validation. Objects separately copied into an application database may not automatically follow those response directives. Define invalidation, deletion and account scope in the local data layer as well. A freshness duration alone cannot prevent content belonging to one account from appearing in another.

Define what a failed refresh does to visible content

Keeping an explicitly identified older copy may help a reading task more than an empty screen. A consequential action may require fresh verification instead. Distinguish connectivity from content age in the interface. When fresh data arrives, review selection and scroll context so that refreshing does not silently change the task being performed.

Exercise cache boundaries

  1. Open an old copy and fail the refresh.
  2. Change the record on another device and revalidate.
  3. Switch accounts and inspect previous-account content.
  4. Inspect selection and state labels after refreshing.

The output specifies data type, freshness evidence and permitted actions on older data. That contract connects performance choices to an accurate explanation for the person using the app.

Sources