Skip to content

Commit

Permalink
[TASK] Migrate TYPO3#88366 deprecated cache_ prefix on caches
Browse files Browse the repository at this point in the history
  • Loading branch information
dkd-kaehm committed Oct 15, 2021
1 parent 865ebf9 commit 7ef256f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected function getRecordIfIndexConfigurationIsValid($recordTable, $recordUid
*/
protected function getRecordForIndexConfigurationIsValid($recordTable, $recordUid, $recordWhereClause)
{
$cache = GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'cache_runtime');
$cache = GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'runtime');
$cacheId = md5('ConfigurationAwareRecordService' . ':' . 'getRecordIfIndexConfigurationIsValid' . ':' . $recordTable . ':' . $recordUid . ':' . $recordWhereClause);

$row = $cache->get($cacheId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class RootPageResolver implements SingletonInterface
public function __construct(ConfigurationAwareRecordService $recordService = null, TwoLevelCache $twoLevelCache = null)
{
$this->recordService = $recordService ?? GeneralUtility::makeInstance(ConfigurationAwareRecordService::class);
$this->runtimeCache = $twoLevelCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'cache_runtime');
$this->runtimeCache = $twoLevelCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'runtime');
$this->extensionConfiguration = GeneralUtility::makeInstance(ExtensionConfiguration::class);
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Site/SiteRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function __construct(
)
{
$this->rootPageResolver = $rootPageResolver ?? GeneralUtility::makeInstance(RootPageResolver::class);
$this->runtimeCache = $twoLevelCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */'cache_runtime');
$this->runtimeCache = $twoLevelCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */'runtime');
$this->registry = $registry ?? GeneralUtility::makeInstance(Registry::class);
$this->siteFinder = $siteFinder ?? GeneralUtility::makeInstance(SiteFinder::class);
$this->extensionConfiguration = $extensionConfiguration ?? GeneralUtility::makeInstance(ExtensionConfiguration::class);
Expand Down
2 changes: 1 addition & 1 deletion Classes/IndexQueue/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private function addNewItem($itemType, $itemUid, $indexingConfiguration, $rootPa
*/
protected function getRecordCached($itemType, $itemUid, $additionalRecordFields)
{
$cache = GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'cache_runtime');
$cache = GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'runtime');
$cacheId = md5('Queue' . ':' . 'getRecordCached' . ':' . $itemType . ':' . $itemUid . ':' . 'pid' . $additionalRecordFields);

$record = $cache->get($cacheId);
Expand Down
2 changes: 1 addition & 1 deletion Classes/System/Configuration/ConfigurationPageResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ConfigurationPageResolver
*/
public function __construct(PageRepository $pageRepository = null, TwoLevelCache $twoLevelCache = null, SystemTemplateRepository $systemTemplateRepository = null)
{
$this->runtimeCache = $twoLevelCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'cache_runtime');
$this->runtimeCache = $twoLevelCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'runtime');
$this->systemTemplateRepository = $systemTemplateRepository ?? GeneralUtility::makeInstance(SystemTemplateRepository::class);
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/System/Records/Pages/PagesRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class PagesRepository extends AbstractRepository
*/
public function __construct(TwoLevelCache $transientVariableCache = null)
{
$this->transientVariableCache = $transientVariableCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'cache_runtime');
$this->transientVariableCache = $transientVariableCache ?? GeneralUtility::makeInstance(TwoLevelCache::class, /** @scrutinizer ignore-type */ 'runtime');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Tests/Integration/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function setUp()
// during the tests we don't want the core to cache something in cache_core
/* @var CacheManager $cacheManager */
$cacheManager = GeneralUtility::makeInstance(CacheManager::class);
$coreCache = $cacheManager->getCache('cache_core');
$coreCache = $cacheManager->getCache('core');
$coreCache->flush();

$this->instancePath = $this->getInstancePath();
Expand Down

0 comments on commit 7ef256f

Please sign in to comment.