Memory Store

The Memory Store keeps sessions in server memory for fast access.

Overview

spinner

Usage

Session.configure do |config|
  config.provider = Session::MemoryStore(UserSession).provider
end

Characteristics

Feature
Value

Storage

Server memory

Max Size

Available RAM

Persistence

None (lost on restart)

Multi-node

No

Speed

Fastest

Best For

  • Development and testing

  • Single-server deployments

  • Prototype applications

Memory Management

Limitations

  • Sessions lost on restart

  • Not shared across servers

  • Memory grows with sessions

Last updated

Was this helpful?