Skip to content

Instantly share code, notes, and snippets.

@davidalger
Last active August 4, 2020 23:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidalger/634362ac83336d07eaea4a8cdfd7db2b to your computer and use it in GitHub Desktop.
Save davidalger/634362ac83336d07eaea4a8cdfd7db2b to your computer and use it in GitHub Desktop.
Pulls password for Redis authentication from Magento 2 configuration file to run `redis-cli flushall`
REDISCLI_AUTH=$(php -r '
$env = require_once "app/etc/env.php";
echo @$env["cache"]["frontend"]["default"]["backend_options"]["password"];
') redis-cli flushall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment