Dispatch an event just before the cached content gets sent to the client