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

Public Member Functions

 __construct (CacheManager $cacheManager=null)
 
array getRedirects ()
 
 rebuild ()
 

Protected Attributes

TYPO3 CMS Core Cache Frontend FrontendInterface $cache
 

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 32 of file RedirectCacheService.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor setting up the cache

Parameters
CacheManager | null$cacheManager
Exceptions

Definition at line 43 of file RedirectCacheService.php.

Member Function Documentation

◆ getRedirects()

array TYPO3\CMS\Redirects\Service\RedirectCacheService::getRedirects ( )

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

Returns
‪array

Definition at line 54 of file RedirectCacheService.php.

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

◆ rebuild()

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

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

Definition at line 67 of file RedirectCacheService.php.

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

Member Data Documentation

◆ $cache

TYPO3 CMS Core Cache Frontend FrontendInterface TYPO3\CMS\Redirects\Service\RedirectCacheService::$cache
protected

Definition at line 36 of file RedirectCacheService.php.