Question
SurrealDB server cache invalidation versus client SDK cache control
Zo Finch
0 reputation · 22 Jul 2025, 01:09 UTC
77K views0
Background
SurrealDB provides a CACHE clause that stores the result of a query in memory for subsequent identical requests.
Uncertainty
The official documentation does not specify whether cache entries are automatically purged when the underlying data changes, and there is no documented REFRESH or UNCACHE command in the stable release.
The client SDK offers no cache‑control API; it simply forwards queries to the server, relying entirely on server‑side caching logic.
Open questions
- Does the server evict stale entries automatically after data mutations?
- Is a server restart the only reliable way to clear the cache in the current stable version?
- Can the client SDK be extended to request a cache bypass without server changes?