TQDBProxy: A Go cache for MariaDB and PostgreSQL
There are excellent database proxies out there. pgpool-II, MaxScale, and ProxySQL are battle-tested, feature-rich, and used in production by thousands of companies. I’ve built TQDBProxy as a learning project to explore a different approach: what if caching decisions lived in the application code itself? Custom client libraries for PHP, TypeScript, and Go allow you to (optionally) specify a cache time-to-live (TTL) as an extra argument to a query method. Queries with a TTL are cached for the specified duration. After expiry, the first request refreshes the cache (blocking), while others briefly get stale data until the refresh completes. ...