Useful Redis commands


Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 569 of /homepages/46/d762693627/htdocs/dc/includes/
Useful Redis commands

Some useful commands you can run with the redis-cli command. To use these, ssh into one of the cache or web servers and type the command.

# Get number of keys in cache

redis-cli dbsize


# Flush all keys (don't run this on live!)

redis-cli flushall


# List all keys

redis-cli keys "*"


# Search keys

redis-cli keys "*panels*"


# View a key's value

redis-cli hgetall mykey


# Delete a specific key

redis-cli del "phoenix-redis:cache:atd3_ticket_prices_10_710_277141"


# Delete keys matching a pattern

redis-cli keys "*panels*" | xargs redis-cli del


# Monitor activity




# List a key's type

redis-cli type mykey


# List the contents of a hash key

redis-cli hgetall phoenix-redis:cache:locale:pt-br

blog tag: