onFlush event to update http cache