CRM-13470: add hook_flush_caches (reverse-merged from commit 1a76b32336acd7a4e6774847c3926e707c489ef7)