Tagged articles
5 articles
Page 1 of 1
Code Wrench
Code Wrench
Oct 25, 2025 · Backend Development

Mastering Go Local Cache: TTL, Sharded LRU, Singleflight & Async Refresh

This article walks through a production‑grade Go local cache implementation, covering TTL and LRU fundamentals, sharded concurrency, singleflight protection, asynchronous refresh, capacity control, persistence, performance testing, and real‑world usage scenarios.

CacheGoLRU
0 likes · 9 min read
Mastering Go Local Cache: TTL, Sharded LRU, Singleflight & Async Refresh
Go Programming World
Go Programming World
Nov 25, 2024 · Backend Development

Understanding Go's singleflight: Request Merging, Implementation and Use Cases

singleflight, a Go concurrency primitive from the x/sync package, merges duplicate in‑flight requests to reduce server load, with detailed usage examples, source code analysis, and discussion of its differences from sync.Once and typical application scenarios such as cache‑penetration, remote calls, and task deduplication.

CacheGoSingleflight
0 likes · 26 min read
Understanding Go's singleflight: Request Merging, Implementation and Use Cases
Inke Technology
Inke Technology
Oct 20, 2022 · Backend Development

How We Cut 60% of Backend Load with Go’s singleflight and Smart Caching

This article examines how the mic‑queue list in a live‑streaming app caused heavy server load due to three‑second polling, and details a systematic performance‑optimization process—including analysis, reducing I/O, employing Go’s singleflight caching, and switching JSON libraries—to cut resource usage by up to 60% while preserving user experience.

BackendGolangSingleflight
0 likes · 7 min read
How We Cut 60% of Backend Load with Go’s singleflight and Smart Caching