Broad strokes here:
While there isn't a hook out there in pre-D8, you could write your own database backend based upon the standard DrupalDatabaseCache
one and then write any or all sorts of logic into your clear()
function. A quick look would suggest this to be a reasonably straightforward in D7 (just copy the class to your custom name and modify it etc by throwing in a module_invoke_all()
as appropriate) and with the cache_backport
modulecache_backport module would even work in D6. Then point any cache bins you want fancified on clear and you should be on your way.