Last active
January 28, 2019 21:17
-
-
Save mttjohnson/009c7c1eac6a133278b9df9f3c36253a to your computer and use it in GitHub Desktop.
Extract gzipped redis value for Magento 1.x cached config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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