Automation tool for clearing up old entries in cache tables