How exe.dev taught sqlc-generated code to invalidate its caches

davidcrawshaw · x · 2026-08-21

A post on the exe.dev blog by Ian Lance Taylor explains how they tackled distributed cache invalidation. Their proxies run worldwide and cache VM routing info (HTTP Host headers, SSH public keys, VM locations) rather than querying a central database on every connection—but VMs move and sharing states change, forcing them to solve the classic cache invalidation problem.

Their database layer uses the Go sqlc code generator, and they extended the sqlc-generated code to handle cache invalidation automatically. The post also covers why replicating the full database to every proxy was rejected: most data is irrelevant to proxies and some of it, like billing links, is sensitive.

Original post →

More from coding & agent

coding & agent channel →