Home / Companies / exe.dev / Blog / Post Details
Content Deep Dive

We Taught sqlc to Invalidate Our Caches

Blog post from exe.dev

Post Details
Company
Date Published
Author
Ian Lance Taylor
Word Count
909
Company Posts That Month
13
Language
English
Hacker News Points
3
Post removed?
No
Summary

exe.dev routes HTTP and SSH connections through globally distributed proxy servers that need current VM routing and access information without repeatedly querying a centralized database or replicating sensitive, irrelevant data everywhere. To balance performance and consistency, proxies cache data after an initial database lookup, while the system invalidates cached entries whenever relevant routing or sharing information changes. Its Go code uses a modified version of sqlc, which generates type-safe database functions and additionally records the tables and row-selection fields involved in reads and writes. Read operations accumulate dependency information through Go contexts, while committed writes invoke hooks that identify potentially affected cached data. A centralized writer process sends invalidation messages to proxies whose caches depended on modified rows, allowing them to conservatively discard related entries, such as all cached VM data for a given owner, and retrieve fresh information only when needed.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.