Skip to content

Commit 6dddd1b

Browse files
committed
updated cache-type
1 parent 779216c commit 6dddd1b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/core/Mage/Csp/Model/Config.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
*/
1515
class Mage_Csp_Model_Config extends Varien_Simplexml_Config
1616
{
17+
public const CACHE_TYPE = 'config';
18+
public const CACHE_ID = 'config_csp';
1719
public const CACHE_TAG = 'config_csp';
1820

1921
/**
2022
* @inheritDoc
2123
*/
2224
public function __construct($sourceData = null)
2325
{
24-
$this->setCacheId('config_csp');
26+
$this->setCacheId(self::CACHE_ID);
2527
$this->setCacheTags([self::CACHE_TAG]);
2628
$this->setCacheChecksum(null);
2729

@@ -37,7 +39,7 @@ public function __construct($sourceData = null)
3739
*/
3840
protected function _construct(): self
3941
{
40-
if (Mage::app()->useCache('config_csp') && $this->loadCache()) {
42+
if (Mage::app()->useCache(self::CACHE_TYPE) && $this->loadCache()) {
4143
return $this;
4244
}
4345

@@ -46,7 +48,7 @@ protected function _construct(): self
4648

4749
$this->setXml($config->getNode());
4850

49-
if (Mage::app()->useCache('config_api')) {
51+
if (Mage::app()->useCache(self::CACHE_TYPE)) {
5052
$this->saveCache();
5153
}
5254
return $this;

0 commit comments

Comments
 (0)