Back to browse
GitHub Repository

Request-scoped deduplication and memoization for Go. Singleflight + caching, scoped to context.Context.

4 starsGo

callonce-go – singleflight and per-request caching for Go services

by probablyarth·Feb 17, 2026·1 point·0 comments

AI Analysis

●●SolidNiche GemBig Brain
The Take

Combines singleflight with a context-scoped per-request cache so concurrent and subsequent callers share one in-flight call and instant cached results, respectively. Typed Key[T] generics and a tiny API (WithCache/Get) make it trivial to add to middleware, and the zero-allocation claim targets the micro-optimizations Go teams care about.

Target Audience

Backend developers — specifically Go programmers building HTTP services, middleware, or microservices

Similar Projects

AI/ML●●Solid

Entroly – Compress codebase context for LLMs by 78% using Rust

Entropy-based context compression beats naive token stuffing, but the category is crowded.

Big BrainNiche Gem
savetokens
102mo ago
AI/ML●●Solid

Save Context from MCP Bloat

Caches bloated MCP responses and lets agents query with jq, saving real tokens.

Big BrainSolve My Problem
healqq
2027d ago