RedirectCacheService
Ensure to clear the cache entry when a sys_redirect record is modified, also the main pool for getting all redirects.
Table of Contents
Properties
Methods
- __construct() : mixed
- getRedirects() : array<string|int, mixed>
- Fetches all redirects available to the system, grouped by domain and regexp/nonregexp
- rebuildAll() : void
- Rebuild cache for each distinct redirect source_host.
- rebuildForHost() : array<string|int, mixed>
- Rebuilds the cache for all redirects, grouped by host as well as by regular expressions and respect_query_parameters.
Properties
$cache
protected
FrontendInterface
$cache
Methods
__construct()
public
__construct([CacheManager|null $cacheManager = null ]) : mixed
Parameters
- $cacheManager : CacheManager|null = null
getRedirects()
Fetches all redirects available to the system, grouped by domain and regexp/nonregexp
public
getRedirects(string $sourceHost) : array<string|int, mixed>
Parameters
- $sourceHost : string
Return values
array<string|int, mixed>rebuildAll()
Rebuild cache for each distinct redirect source_host.
public
rebuildAll() : void
rebuildForHost()
Rebuilds the cache for all redirects, grouped by host as well as by regular expressions and respect_query_parameters.
public
rebuildForHost(string $sourceHost) : array<string|int, mixed>
Does not include hidden or deleted redirects, but includes the ones with dynamic starttime/endtime.
Parameters
- $sourceHost : string