Purging the Redis cache via CLI

Using telnet, you can execute remote commands on the Redis daemon; being able to flush database by command line can be essential if your Magento access is somehow compromised.

Default instances

By default, there are 2 Redis instances, if you have installed Redis as per our instructions, they are used as follows,

  • redis1.i - used for session storage only
  • redis11.i - used for cache storage (and FPC cache storage for EE)

To flush all databases

telnet redis11.i 6379

To flush a single database

telnet redis11.i 6379
select 1

Where 1 represents the DB number and redis11.i represents the instance - specified in your ./app/etc/local.xml