v7.1.3.2 - Show latest stable - Superclass: Object

The session class is used by the DatabaseSelector::Resolver to save timestamps of the last write in the session.

The last_write is used to determine whether it’s safe to read from the replica or the request needs to be sent to the primary.

Attributes

[R]session

Files

  • activerecord/lib/active_record/middleware/database_selector/resolver/session.rb