Skip to content

Instantly share code, notes, and snippets.

@mttjohnson
Last active January 28, 2019 21:17
Show Gist options
  • Save mttjohnson/009c7c1eac6a133278b9df9f3c36253a to your computer and use it in GitHub Desktop.
Save mttjohnson/009c7c1eac6a133278b9df9f3c36253a to your computer and use it in GitHub Desktop.
Extract gzipped redis value for Magento 1.x cached config
<?php
# Find Magento crontab configs
# redis-cli -p 6379 KEYS \* | grep -i CONFIG_GLOBAL_CRONTAB
# redis-cli -p 6379 hget zc:k:c62_CONFIG_GLOBAL_CRONTAB d
# Find config value from redis object store
# redis-cli -p 6379 KEYS \* | grep -i CONFIG_GLOBAL
# redis-cli -p 6379 HGET zc:k:c62_CONFIG_GLOBAL d
require_once 'app/Mage.php';
Mage::setIsDeveloperMode(true);
Mage::app();
$redis_options = [
'server' => 'redis',
'port' => '6379',
'database' => '0'
];
$credis = new Cm_Cache_Backend_Redis($redis_options);
$data = $credis->load('c62_CONFIG_GLOBAL');
print $data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment