Memcached flush_all 命令
flush_all 清空所有缓存(可延迟执行)。
Key Pointsflush_all 让全量 key 立即(或 N 秒后)失效,运维排障利器但慎用。
用法
Shell
flush_all # 立即清空
flush_all 10 # 10 秒后清空(让在途请求先完成)Output
OKflush_all wipes ALL cache on the instance — the DB suddenly takes full traffic and can collapse. Use only for troubleshooting or after a full data reload, always with a delay, never casually at peak.
用法
Shell
flush_all # 立即清空
flush_all 10 # 10 秒后清空(让在途请求先完成)Output
OKflush_all 会清空整台实例的所有缓存,数据库瞬间承受全部流量,极易把后端打挂。只在排障或数据全量更新后使用,且生产务必加延迟(让在途请求先落地),绝不在高峰随手敲。