‪TYPO3CMS  ‪main
TYPO3\CMS\Redirects\Service\RedirectCacheService Class Reference

Public Member Functions

 __construct (CacheManager $cacheManager=null)
 
 getRedirects (string $sourceHost)
 
 rebuildForHost (string $sourceHost)
 
 rebuildAll ()
 

Protected Attributes

FrontendInterface $cache
 

Private Member Functions

 buildCacheIdentifier (string $sourceHost)
 

Detailed Description

Ensure to clear the cache entry when a sys_redirect record is modified, also the main pool for getting all redirects.

Definition at line 33 of file RedirectCacheService.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Redirects\Service\RedirectCacheService::__construct ( CacheManager  $cacheManager = null)

Definition at line 39 of file RedirectCacheService.php.

Member Function Documentation

◆ buildCacheIdentifier()

TYPO3\CMS\Redirects\Service\RedirectCacheService::buildCacheIdentifier ( string  $sourceHost)
private

◆ getRedirects()

TYPO3\CMS\Redirects\Service\RedirectCacheService::getRedirects ( string  $sourceHost)

Fetches all redirects available to the system, grouped by domain and regexp/nonregexp

Definition at line 48 of file RedirectCacheService.php.

References TYPO3\CMS\Redirects\Service\RedirectCacheService\buildCacheIdentifier(), and TYPO3\CMS\Redirects\Service\RedirectCacheService\rebuildForHost().

◆ rebuildAll()

TYPO3\CMS\Redirects\Service\RedirectCacheService::rebuildAll ( )

Rebuild cache for each distinct redirect source_host.

Definition at line 113 of file RedirectCacheService.php.

References TYPO3\CMS\Redirects\Service\RedirectCacheService\rebuildForHost().

◆ rebuildForHost()

TYPO3\CMS\Redirects\Service\RedirectCacheService::rebuildForHost ( string  $sourceHost)

Rebuilds the cache for all redirects, grouped by host as well as by regular expressions and respect_query_parameters. Does not include hidden or deleted redirects, but includes the ones with dynamic starttime/endtime.

Definition at line 62 of file RedirectCacheService.php.

References TYPO3\CMS\Redirects\Service\RedirectCacheService\buildCacheIdentifier().

Referenced by TYPO3\CMS\Redirects\Service\RedirectCacheService\getRedirects(), and TYPO3\CMS\Redirects\Service\RedirectCacheService\rebuildAll().

Member Data Documentation

◆ $cache

FrontendInterface TYPO3\CMS\Redirects\Service\RedirectCacheService::$cache
protected

Definition at line 37 of file RedirectCacheService.php.