function drush_redis_flush in Redis 7.2
Callback for the redis-flush command
File
- ./
redis.drush.inc, line 29 - Drush integration.
Code
function drush_redis_flush() {
if (!drush_confirm(dt('Do you really want to continue?'))) {
return drush_user_abort();
}
// @todo Not really clean, but this will actually work because the
// command is the same with both PhpRedis and Predis backends.
Redis_Client::getClient()
->flushdb();
drush_log('Redis Database was flushed.', 'ok');
}