src/Charcoal/Cache/Middleware/CacheMiddleware.php
private function cacheKeyFromRequest(RequestInterface $request)
    {
        $uri = $request->getUri();

        $queryStr = $uri->getQuery();
        if (!empty($queryStr)) {
            $queryArr = [];

            parse_str($queryStr, $queryArr);

            $queryArr = $this->parseIgnoredParams($queryArr);
            $queryStr = http_build_query($queryArr);

            $uri = $uri->withQuery($queryStr);
        }

        $cacheKey = 'request/' . $request->getMethod() . '/' . md5((string)$uri);
        return $cacheKey;
    }
private function cacheKeyFromRequest(RequestInterface $request)
    {
        $uri = $request->getUri();

        $queryStr = $uri->getQuery();
        if (!empty($queryStr)) {
            $queryArr = [];

            parse_str($queryStr, $queryArr);

            $queryArr = $this->parseIgnoredParams($queryArr);
            $queryStr = http_build_query($queryArr);

            $uri = $uri->withQuery($queryStr);
        }

        $cacheKey = 'request/' . $request->getMethod() . '/' . md5((string)$uri);
        return $cacheKey;
    }
private function cacheKeyFromRequest ( RequestInterface $ request ) { $ uri = $ request -> getUri ( ) ; $ queryStr = $ uri -> getQuery ( ) ; if ( ! empty ( $ queryStr ) ) { $ queryArr = [ ] ; parse_str ( $ queryStr , $ queryArr ) ; $ queryArr = $ this -> parseIgnoredParams ( $ queryArr ) ; $ queryStr = http_build_query ( $ queryArr ) ; $ uri = $ uri -> withQuery ( $ queryStr ) ; } $ cacheKey = 'request/' . $ request -> getMethod ( ) . '/' . md5 ( ( string ) $ uri ) ; return $ cacheKey ; }
Generate the cache key from the HTTP request.

@param  RequestInterface $request The PSR-7 HTTP request.
@return string
Generate the cache key from the HTTP request .