Neos\Flow\Mvc\Routing\RouterCachingService::getCachedMatchResults PHP Метод

getCachedMatchResults() публичный Метод

Checks the cache for the route path given in the Request and returns the result
public getCachedMatchResults ( Request $httpRequest ) : array | boolean
$httpRequest Neos\Flow\Http\Request
Результат array | boolean the cached route values or FALSE if no cache entry was found
    public function getCachedMatchResults(Request $httpRequest)
    {
        $cachedResult = $this->routeCache->get($this->buildRouteCacheIdentifier($httpRequest));
        if ($cachedResult !== false) {
            $this->systemLogger->log(sprintf('Router route(): A cached Route with the cache identifier "%s" matched the path "%s".', $this->buildRouteCacheIdentifier($httpRequest), $httpRequest->getRelativePath()), LOG_DEBUG);
        }
        return $cachedResult;
    }

Usage Example

 /**
  * @test
  */
 public function getCachedMatchResultsReturnsFalseIfNotFoundInCache()
 {
     $expectedResult = false;
     $cacheIdentifier = '89dcfa70030cbdf762b727b5ba41c7bb';
     $this->mockRouteCache->expects($this->once())->method('get')->with($cacheIdentifier)->will($this->returnValue(false));
     $actualResult = $this->routerCachingService->getCachedMatchResults($this->mockHttpRequest);
     $this->assertEquals($expectedResult, $actualResult);
 }
All Usage Examples Of Neos\Flow\Mvc\Routing\RouterCachingService::getCachedMatchResults