/** * Should be run after a route is executed * Creates a new etag for this response content * @param Route $route * @param Request $request * @param Response|null $response */ public function after(Route $route, Request $request, $response = null) { if (!$response instanceof \Illuminate\Http\Response) { return; } $this->routecache->setCacheFromResponse($response); $this->routecache->setResponseHeader($response); }
/** * Removes the Contentcache for the current or given Request/URL * @param array|string|Request|null $data */ public function handle($data) { if (is_array($data)) { foreach ($data as $recData) { $this->handle($recData); } return; } if ($data instanceof Request) { $this->routecache->setEntityFromRequest($data); } if (is_string($data)) { $this->routecache->setEntityFromUrl($data); } $this->routecache->removeCache(); }