This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## extend all the redis TTL keys | |
redis-cli keys '*' | xargs -n1 -I {} /bin/bash -c 'redis-cli expire {} $(redis-cli ttl {} | xargs -I{} echo {} + EXTEND_VALUE | bc)' | |
## update all the redis keys with new ttl value | |
redis-cli KEYS '*' | xargs -I{} redis-cli EXPIRE {} EXPIRE_VALUE | |
## get all the redis TTL keys | |
redis-cli KEYS '*' | xargs -I{} redis-cli TTL {} | |