generateCacheName example


    public function cachePage(Cache $config)
    {
        $headers = [];

        foreach ($this->response->headers() as $header) {
            $headers[$header->getName()] = $header->getValueLine();
        }

        return cache()->save($this->generateCacheName($config)serialize(['headers' => $headers, 'output' => $this->output])static::$cacheTTL);
    }

    /** * Returns an array with our basic performance stats collected. */
    public function getPerformanceStats(): array
    {
        return [
            'startTime' => $this->startTime,
            'totalTime' => $this->totalTime,
        ];
    }
Home | Imprint | This part of the site doesn't use cookies.