RouterCachingService
class RouterCachingService (View source)
Caching of findMatchResults() and resolve() calls on the web Router.
Properties
protected VariableFrontend | $routeCache | ||
protected VariableFrontend | $resolveCache | ||
protected PersistenceManagerInterface | $persistenceManager | ||
protected LoggerInterface | $logger | ||
protected ObjectManagerInterface | $objectManager | ||
protected array | $routingSettings |
Methods
No description
No description
Checks the cache for the given RouteContext and returns the result or false if no matching ache entry was found
Stores the $matchResults in the cache
Checks the cache for the given ResolveContext and returns the cached UriConstraints if a cache entry is found
Stores the resolved UriConstraints in the cache together with the $routeValues
No description
Flushes 'route' and 'resolve' caches.
Flushes 'findMatchResults' and 'resolve' caches for the given $tag
Flushes 'findMatchResults' and 'resolve' caches for the given $tags
Flushes 'findMatchResults' caches that are tagged with the given $uriPath
Checks if the given subject contains an object
Recursively converts objects in an array to their identifiers
Generates the Resolve cache identifier for the given Request
Helper method to generate tags by taking all UUIDs contained in the given $routeValues or $matchResults
Details
injectLogger(LoggerInterface $logger)
No description
void
initializeObject()
No description
array|false
getCachedMatchResults(RouteContext $routeContext)
Checks the cache for the given RouteContext and returns the result or false if no matching ache entry was found
void
storeMatchResults(RouteContext $routeContext, array $matchResults, RouteTags $matchedTags = null, RouteLifetime $matchedLifetime = null)
Stores the $matchResults in the cache
UriConstraints|false
getCachedResolvedUriConstraints(ResolveContext $resolveContext)
Checks the cache for the given ResolveContext and returns the cached UriConstraints if a cache entry is found
void
storeResolvedUriConstraints(ResolveContext $resolveContext, UriConstraints $uriConstraints, RouteTags $resolvedTags = null, RouteLifetime $resolvedLifetime = null)
Stores the resolved UriConstraints in the cache together with the $routeValues
protected array
generateRouteTags(string $uriPath, array $routeValues)
No description
void
flushCaches()
Flushes 'route' and 'resolve' caches.
void
flushCachesByTag(string $tag)
Flushes 'findMatchResults' and 'resolve' caches for the given $tag
void
flushCachesByTags(array $tags)
Flushes 'findMatchResults' and 'resolve' caches for the given $tags
void
flushCachesForUriPath(string $uriPath)
Flushes 'findMatchResults' caches that are tagged with the given $uriPath
protected bool
containsObject(mixed $subject)
Checks if the given subject contains an object
protected array|null
convertObjectsToHashes(array $routeValues)
Recursively converts objects in an array to their identifiers
protected string
buildResolveCacheIdentifier(ResolveContext $resolveContext, array $routeValues)
Generates the Resolve cache identifier for the given Request
protected array
extractUuids(array $values)
Helper method to generate tags by taking all UUIDs contained in the given $routeValues or $matchResults