Rails 8 introduces Solid Cache as the default production cache store, replacing Redis/Memcached with a database-backed solution that leverages modern SSD performance. The post covers installation for new and existing apps, configuration options (max_age, max_size, compression, sharding), real-world usage patterns (fragment caching, Russian doll caching, API response caching), and key tradeoffs including FIFO vs LRU eviction, 1–5ms latency vs Redis's 0.1–0.5ms, write amplification, lack of pub/sub support, and cold-start thundering herd issues. Guidance is provided on when to use Solid Cache versus sticking with Redis, plus performance tuning tips for compression, connection pooling, and migration steps.

5m read timeFrom blog.saeloun.com
Post cover image
Table of contents
The Case for Database Backed CachingInstallationDatabase ConfigurationConfiguration OptionsReal World Usage ExamplesCache Expiration StrategySharding for ScaleEncryptionCaveats and ConsiderationsMigration from RedisWhen to Use Solid CachePerformance TuningConclusion

Sort: