Ruby on Rails: How can I get all the session data from Redis on the server side?

I need to get all active session data from my Rails application. I am using Redis for session storage.

I tried REDIS.keysand then REDIS.get("SESSION_KEY"), but it looks like encrypted data .

Is there a painless solution to getting live session data in Rails?

Thanks.

+4
source share
1 answer

Decrypt Rails Session Data from Redis

Ruby on Rails . :
https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/http/rack_cache.rb#L17

:

Marshal.load(REDIS.get("SESSION_KEY"))
+2

Source: https://habr.com/ru/post/1618893/


All Articles