Fix the setting of X-Cache:Miss to the before function

The after function fires with the headers already locked (res.writeHead()) therefore and exception was thrown at runtime.