Redis and Memcached are the two long-standing open-source in-memory key-value caches. Memcached is intentionally minimal: a string-to-string LRU cache with no persistence, no replication, and no data types beyond a flat key/value pair. Redis is a feature-rich data-structure server: it supports strings, lists, sets, sorted sets, hashes, streams, geospatial indexes, pub/sub, transactions, Lua scripting, and optional disk persistence (RDB snapshots and AOF append-only logs). Redis is the right default for almost any new project; Memcached survives in legacy PHP stacks and as a tiny-footprint LRU side-cache.
In a self-hosting context
Almost every self-hostable SaaS replacement that needs a cache or a session store uses Redis or a Redis-protocol-compatible server (Valkey, KeyDB, Dragonfly). Mattermost, n8n, Plausible Analytics, and Sentry (self-hosted) all assume Redis. Note that Redis re-licensed away from BSD-3-Clause to a dual SSPL/RSAL license in 2024 and the community forked the previous version as Valkey under the original BSD license — see BSL (Business Source License) and SSPL (Server Side Public License) for the broader source-available trend.