/ redis

Clear Redis cache and Solr indexes

As I am working in an app which needs keys to be stored in Redis and index data in Solr, due to redis eviction policy, sometimes keys gets evicted, but index in solar remains same, which result in confusing local behavior for me.

To clear local redis copy, I do it from redis-cli:

$ redis-cli> FLUSHDB


OK> exit

To remove Solr indexes, I use curl:

$ curl http://localhost:8982/solr/update?commit=true -d '**:**'