An in-memory data store used as a cache, data structure server, document store, vector database, and message broker.
- Stars
- 2,524
- Forks
- 76
- Open issues
- 18
- Last commit
- 3 months ago
What is it?
Pogocache is a caching server focused on low latency and low CPU use per request. It listens for clients over several wire protocols, including Memcache, Valkey/Redis (RESP), HTTP and Postgres, so existing tools such as curl, redis-cli, psql and common client libraries can connect without changes.
It can also run embedded. The self-contained pogocache.c file can be compiled directly into a C program, which lets the application call the cache functions without going through the network. Server features include TLS on a separate port, password authentication, configurable memory limits with eviction, optional persistence to a file, and sharded hashmaps with per-shard locking.
The project targets 64-bit Linux and macOS and is written in C. Its README includes benchmark tables comparing it with Redis, Valkey, Dragonfly, Garnet and Memcache on a single AWS instance type; those numbers come from the author's own test setup.
Key features
- 01Accepts Memcache, RESP (Valkey/Redis), HTTP and Postgres wire protocols on one server.
- 02Can be compiled into a C program as a single file for in-process caching.
- 03Supports TLS, auth passwords and configurable maxmemory with eviction.
- 04Offers optional persistence to a file and key expiration with TTL.
- 05Uses a sharded hashmap with per-shard spinlocks and epoll/kqueue event loops.
Use cases
- Replacing a Redis or Memcache instance in a latency-sensitive service without changing client code.
- Embedding a fast key-value cache directly inside a C or C++ application.
- Using curl or psql as a quick way to inspect and set cache values during development.
Quick start
- 1
Build the pogocache program from source
make - 2
Start the server on localhost port 9401
./pogocache - 3
Connect with curl to store and read a value
curl -X PUT -d "my value" http://localhost:9401/mykey
Things to know
- Designed and tested only on 64-bit Linux and macOS.
- The README does not document Windows support.
Topics
FAQ
- What is pogocache?
- A low-latency caching server written in C that speaks Memcache, Redis/Valkey, HTTP and Postgres protocols, and can be embedded as a single C file. Pogocache is a caching server focused on low latency and low CPU use per request. It listens for clients over several wire protocols, including Memcache, Valkey/Redis (RESP), HTTP and Postgres, so existing tools such as curl, redis-cli, psql and common client libraries can connect without changes.
- Is pogocache free to use? What license does it have?
- pogocache is open source under the MIT license. Check the license terms before using it in commercial products.
- Is pogocache still maintained?
- Updated within 6 months. The last commit to pogocache was on Aug 5, 2026.
- What can I use pogocache for?
- Replacing a Redis or Memcache instance in a latency-sensitive service without changing client code. Embedding a fast key-value cache directly inside a C or C++ application. Using curl or psql as a quick way to inspect and set cache values during development.
- How do I install pogocache?
- Build the pogocache program from source: make Start the server on localhost port 9401: ./pogocache Connect with curl to store and read a value: curl -X PUT -d "my value" http://localhost:9401/mykey
- Where can I get pogocache?
- The source code and installation instructions are on GitHub: https://github.com/tidwall/pogocache
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An in-memory data store that is API-compatible with Redis and Memcached, aiming to be a drop-in replacement for both.
Distributed, reliable key-value store for the most critical data of a distributed system, built on Raft consensus with a gRPC API.
A graph database that stores adjacency as sparse matrices and queries with OpenCypher, aimed at knowledge graphs for LLM and GraphRAG workloads.
A Redis- and Valkey-compatible in-memory key-value server written in Rust, with built-in full-text and vector search.
Async state management and data fetching library for web apps, with bindings for React, Vue, Svelte and Solid.