Redis : Delete Keys by checking/matching expiry time remaining.

Sometimes we need to remove specific group of keys which are created earlier or have a specific expiry time remaining. You can simply delete Redis Key-value pairs by checking their expiry time remaining and running this simple script on your console: redis-cli -h <hostname> keys  “*” | while read LINE ; do TTL=`redis-cli -h <hostname> ttl […]