$this->defaultRoute =
$defaultRoute;
} /**
* getCacheTime returns the time span for which the cache of the given route remains valid.
*
* @return int|null
*/
public function getCacheTime(Request
$request) { $cacheTime =
$this->defaultRoute->
findRouteValue($request);
if (\
is_array($cacheTime)) { throw new UnexpectedValueException('Cache time should be integer or null at this point'
);
} return $cacheTime;
}}