From 96f8311176280fcc394bc58d817c464973b6e004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Thu, 12 Sep 2019 09:26:07 +0200 Subject: [PATCH] Remove obsolete cache --- .../Classes/Controller/ResellerController.php | 19 ++----------------- .../ext/ep_products/ext_localconf.php | 8 -------- 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/public/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php b/public/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php index 9316b9be..6f42df06 100644 --- a/public/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php +++ b/public/typo3conf/ext/ep_products/Classes/Controller/ResellerController.php @@ -30,8 +30,6 @@ namespace EP\EpProducts\Controller; use EP\EpProducts\Domain\Model\Product; use EP\EpProducts\Domain\Model\Reseller; use EP\EpProducts\Service\ResellerDataService; -use TYPO3\CMS\Core\Cache\CacheManager; -use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; class ResellerController extends ActionController @@ -41,23 +39,14 @@ class ResellerController extends ActionController */ protected $resellerDataService; - /** - * @var \TYPO3\CMS\Core\Cache\Frontend\FrontendInterface - */ - protected $cache; - /** * @param ResellerDataService $resellerDataService - * @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException */ public function __construct(ResellerDataService $resellerDataService) { parent::__construct(); $this->resellerDataService = $resellerDataService; - /** @var CacheManager $cacheManager */ - $cacheManager = GeneralUtility::makeInstance(CacheManager::class); - $this->cache = $cacheManager->getCache('ep_products_reseller'); } /** @@ -78,7 +67,7 @@ class ResellerController extends ActionController /** * @param Reseller $reseller * @param Product $product - + * @throws \Doctrine\DBAL\DBALException * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException * @throws \TYPO3\CMS\Extbase\Mvc\Exception\UnsupportedRequestTypeException */ @@ -93,11 +82,7 @@ class ResellerController extends ActionController ); } - $cacheKey = sprintf('reseller_export_cp_%d_%d', $product->getUid(), $reseller->getUid()); - if (($productData = $this->cache->get($cacheKey)) === false) { - $productData = $this->resellerDataService->preprocessSingle($product, $reseller); - $this->cache->set($cacheKey, $productData, [], 3600); - } + $productData = $this->resellerDataService->preprocessSingle($product, $reseller); $this->view->assign('reseller', $reseller); $this->view->assign('productData', $productData); diff --git a/public/typo3conf/ext/ep_products/ext_localconf.php b/public/typo3conf/ext/ep_products/ext_localconf.php index f2c91963..384126c2 100644 --- a/public/typo3conf/ext/ep_products/ext_localconf.php +++ b/public/typo3conf/ext/ep_products/ext_localconf.php @@ -370,11 +370,3 @@ $GLOBALS['TYPO3_CONF_VARS']['LOG']['EP']['EpProducts']['Controller']['writerConf ]; $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update']['teamSlug'] = \EP\EpProducts\Updates\TeamSlugUpdater::class; - -if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_reseller'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_reseller'] = []; -} - -if (!isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_reseller']['backend'])) { - $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['ep_products_reseller']['backend'] = \TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend::class; -}