Fire an event before cache is cleared to allow tasks to be triggered first

Signed-off-by: Ben James <in@benjam.es>