General-Purpose Library for PHP

0.3.2 2019-12-10 15:08 UTC

This package is auto-updated.

Last update: 2022-01-10 19:47:34 UTC


Could be useful in case of executing redis commands out of framework environment. Rediscli uses it's own entrypoint and reads env variables or .env for Redis connection.

E.g. In case Doctrine is configured to store entity proxies inside Redis, sometimes it's required to clean up Redis cache before Doctrine will be able to regenerate entity proxies.

Supported commands:

  • flushdb
  • flushall
composer requitre imunhatep/rediscli
Usage example:


cd ./bin
ln -s ../vendor/imunhatep/rediscli/bin/redis-cli 
cd ..

flushall example using inline env variables:

REDIS_HOST= REDIS_PORT=6379 REDIS_DB=0 ./bin/redis-cli r:c:flushall

flushdb example providing .env:

./bin/redis-cli r:c:flushdb --dot-env=".env"

flushbd if env variables are set in shell

./bin/redis-cli r:c:flushdb