I would like to add a callback to fire after anyone runs
drush cc all. Ideally this behaviour would be enabled in a drush alias file. Is this possible?
By way of example, in this particular instance I am managing multiple developers across several environments. Each environment is capable of flushing one or more CDN caches, and will do so during various system routines.
I don't want dev, qa, or local environments flushing production caches. Given that
drush cc all is an integral part of the deploy and local build processes, which runs right at the beginning no less, I would like to have calls to
cc all (other than those against @prod) call a method to disable any CDN modules before exit.
Additionally, I may wish to run patch files or other bash scripts to ensure certain environments are up to date in situations where a developer may not be able to merge a dev branch but has resources accessible online which must be updated against security vulnerabilities. And so on.