Session Persistence and Rails Cache Without Redis

For storing small bits of text, Redis has been a popular key value (KV) store for more than a decade, often deployed alongside PostgreSQL in order to leverage the high performance for read and write operations.

Redis is often deployed to store cache data, session identifiers, or background job data. Sidekiq[426] is the most popular background processing framework for Ruby on Rails and uses Redis exclusively for persistence.

Redis is not a SQL database, which means it loses many of the benefits of SQL databases like types, referential integrity, transactions, and more. Redis has different commands like SADD[427] and LPUSH[428] that are straightforward to learn, but are unique to Redis.

As fast ...

Get High Performance PostgreSQL for Rails now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.