Show HN: Pogocache – Fast caching software

63 tidwall 27 7/21/2025, 5:42:30 PM github.com ↗

Comments (27)

drewda · 6h ago
Always great to see his open-source creations, like:

- a Redis like cache purpose built for real-time spatial locations: https://tile38.com/

- go package for reading JSON: https://github.com/tidwall/gjson

tidwall · 2h ago
Glad to bring another one into this world.
squirrellous · 48m ago
Congrats! Would you mind sharing what part of the design makes this faster than the competitors?
tidwall · 30m ago
Thanks! The Pogocache sharded hashmap design is optimized for extremely low contention and good memory locality. It super rare for any two threads to ever wait on the same key. That's the biggest part and it's all in the src/pogocache.c file. But the network layer is finely tuned too.

Mostly I perfed and profiled ad nauseam, monitoring cpu cycles along the way. I found that keeping a focus on latency and cycles was primo, and the rest fell into place.

stevelacy · 4h ago
Congrats on launching! Was following along with the development, glad to see it launched
tidwall · 4h ago
Thanks Steve. Your feedback was very helpful.
jasonthorsness · 6h ago
The README doesn’t seem to explain _why_ it is faster. Is it just highly hand-optimized? Is there some main technique used?
tidwall · 6h ago
Yes, it is highly hand optimized. There's a description of some of the methods I used near the bottom of there README. I mainly focused on minimizing contention, with the sharded hashmap and such. But the networking layer is carefully crafted.
simonw · 5h ago
I thought I recognized the tidwall name - Josh is also responsible for tg which is a really neat, very tight C geospatial library: https://github.com/tidwall/tg
tidwall · 2h ago
Thanks you for the blog post about TG when it came out.
simonw · 5h ago
Supporting HTTP, Redis and PostgreSQL protocols at the same time is a neat trick!

  psql -h localhost -p 9401
  => SET mykey 'my value';
  => GET mykey;
  => DEL mykey;
tidwall · 2h ago
The protocols are autodetected. No need to carry multiple ports around.
Imustaskforhelp · 6h ago
Really looks fascinating.. Might need a deeper dive.

Also.. like, it says that you plan on supporting sql? is this true? What does that actually mean really since I guess it might then compete with things like sqlite/duckdb?

Genuinely curious, great project! Starred!

tidwall · 6h ago
Not intending to make pogocache into a sql database. I prefer keeping it a cache. More so exploring ways to work with existing databases such as sqlite, duckdb, postgres. Kinda like providing proxy-ish operations that transparently cache sql reads.
1337shadow · 2h ago
Reminds me of this dope lib https://pythonhosted.org/johnny-cache/
tidwall · 2h ago
Oh wow. That is dope. Thanks for sharing.
lormayna · 6h ago
Is the name related to Tadej Pogacar?
cedricium · 5h ago
Hah I had the same question! Thought the project was aptly named if referring to the cycling champ if that’s what it was meant to be.
philipajohnston · 5h ago
+1
tidwall · 6h ago
No
nodesocket · 6h ago
Very interesting. Like the idea of using http, redis, or even PostgreSQL clients.

Is there a way to provide the auth password via an envar instead of a command line arg?

    pogocache --auth mypass
tidwall · 6h ago
That's the only way right now. The other ways I'm considering is with an environment variable and/or acl.
sureglymop · 6h ago
May I suggest the ability to specific a path to a file that it is then read from.
tidwall · 2h ago
Like an ACL file?
SquidJack · 6h ago
very nice
CyberDildonics · 1h ago
What is nice about it? You have 9 comments over 3.5 years and they are all promoting your chat bot start up.
tidwall · 2h ago
Thanks!