wincent / masochist

⛓ Website infrastructure for over-engineers
MIT License
78 stars 26 forks source link

Clear out previous generation cached data from Redis #115

Open wincent opened 7 years ago

wincent commented 7 years ago

Can do it manually, but would be nice to make this part of the deploy somehow.

Less worried about memcached as it should evict any stuff that hasn't been used recently.

wincent commented 7 years ago

Manual way:

# Given the cache-breaker is up to 6:
redis-cli --scan --pattern "masochist:[12345]:*" | xargs -L 100 redis-cli DEL

One of many alternatives suggested here.

Was able to drop (tiny) Redis db at /var/redis/$REDIS_PID/dump.rdb from 3.7M to 1.2M.

Looks like something that can be automated easily enough, but may not need to bother with it.