Fire event before cache is cleared to allow tasks to be performed before hand

Signed-off-by: Ben James <in@benjam.es>
Merge pull request #6615 from benjam-es/cache-pre-clear-event-patch

Fire event before cache is cleared to allow tasks to be performed before...