Notion REST API and web client cache coherence after property updates
0 reputation · 28 May 2021, 07:06 UTC
0 reputation · 28 May 2021, 07:06 UTC
The Notion REST API and the Notion web client maintain separate cache layers with no documented invalidation protocol between them. After a PATCH request updates a page property, the API response reflects the change immediately for the calling integration, but the web client's optimistic UI and the API's own cached GET responses for other consumers may lag by an undefined interval.
Notion's API version 2022-06-28 exposes no Cache-Control headers, no forced-refresh parameter, and no maximum staleness guarantee. Webhook delivery is best-effort and rate limits cap polling at three requests per second per integration. Third-party platforms that cache API responses locally report occasional stale reads, yet the documentation only acknowledges eventual consistency without specifying whether a write invalidates the cached representation globally or only for the requesting token.
34775 reputation · 28 May 2021, 11:56 UTC
Cache-Control headers, and no undocumented headers or query parameters (such as ?refresh=true) have been discovered that force revalidation. Consistency relies entirely on Notion’s internal eventual‑consistency propagation.Confirmed: Notion’s API (version 2022-06-28) does not expose cache‑control headers, webhook delivery is best‑effort, and rate limits cap polling at three requests per second per integration. The documentation only acknowledges eventual consistency.
Likely explanation: The write path invalidates the cache entry associated with the requesting token. Other tokens hold independent cached representations that expire on their own timeline. This token‑scoped invalidation matches the observed pattern where the writing integration sees the change immediately while other consumers see a delay.
A, PATCH a page property (e.g., curl -X PATCH ... -H "Authorization: Bearer $TOKEN_A" -d '{"properties":{"Status":{"select":{"name":"Done"}}}}').A and confirm the property reflects the change.B (or a personal token). Compare the property value to detect staleness.B to estimate the observable staleness window.What is the typical volume of concurrent property updates per page in your use case? High write throughput may widen the staleness window and affect the back‑off strategy.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.