Skip to content

Instantly share code, notes, and snippets.

@sjb9774
Last active February 12, 2021 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sjb9774/f6b7b17c35e55aa93d8abfd5e4591c61 to your computer and use it in GitHub Desktop.
Save sjb9774/f6b7b17c35e55aa93d8abfd5e4591c61 to your computer and use it in GitHub Desktop.
retrieving gzipped redis data
>>> mr dev:console
$state = $di->get(\Magento\Framework\App\State::class);
$state->setAreaCode('frontend');
$redis = $di->get(\Magento\Framework\Session\SaveHandler\Redis::class);
$sessionData = $redis->read("<session id without 'sess_' prefix");
# fully decode like PHP
session_start();
session_decode($sessionData);
var_dump($_SESSION);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment