Skip to content

Commit 0e8319c

Browse files
authored
Removed "MAGE" cache tag (OpenMage#3246)
1 parent 1f22ced commit 0e8319c

File tree

5 files changed

+3
-17
lines changed

5 files changed

+3
-17
lines changed

app/code/core/Mage/Admin/Model/Resource/Block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function _generateCache()
7070
Mage::app()->saveCache(
7171
Mage::helper('core')->jsonEncode($data),
7272
self::CACHE_ID,
73-
[Mage_Core_Model_App::CACHE_TAG]
73+
[Mage_Core_Model_Resource_Db_Collection_Abstract::CACHE_TAG]
7474
);
7575
}
7676

app/code/core/Mage/Admin/Model/Resource/Variable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function _generateCache()
3838
Mage::app()->saveCache(
3939
Mage::helper('core')->jsonEncode($data),
4040
self::CACHE_ID,
41-
[Mage_Core_Model_App::CACHE_TAG]
41+
[Mage_Core_Model_Resource_Db_Collection_Abstract::CACHE_TAG]
4242
);
4343
}
4444

app/code/core/Mage/Core/Model/App.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ class Mage_Core_Model_App
3636

3737
public const DISTRO_LOCALE_CODE = 'en_US';
3838

39-
/**
40-
* Cache tag for all cache data exclude config cache
41-
*
42-
*/
43-
public const CACHE_TAG = 'MAGE';
44-
4539
/**
4640
* Default store Id (for install)
4741
*/

app/code/core/Mage/Core/Model/Cache.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,6 @@ public function save($data, $id, $tags = [], $lifeTime = null)
381381
return true;
382382
}
383383

384-
/**
385-
* Add global magento cache tag to all cached data exclude config cache
386-
*/
387-
if (!in_array(Mage_Core_Model_Config::CACHE_TAG, $tags)) {
388-
$tags[] = Mage_Core_Model_App::CACHE_TAG;
389-
}
390384
return $this->getFrontend()->save((string)$data, $this->_id($id), $this->_tags($tags), $lifeTime);
391385
}
392386

@@ -427,8 +421,7 @@ public function clean($tags = [])
427421
}
428422
$res = $this->getFrontend()->clean($mode, $this->_tags($tags));
429423
} else {
430-
$res = $this->getFrontend()->clean($mode, [Mage_Core_Model_App::CACHE_TAG]);
431-
$res = $res && $this->getFrontend()->clean($mode, [Mage_Core_Model_Config::CACHE_TAG]);
424+
$this->flush();
432425
}
433426
return $res;
434427
}

app/code/core/Mage/Core/Model/Resource/Db/Collection/Abstract.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ protected function _saveCache($data, $select)
687687
protected function _getCacheTags()
688688
{
689689
$tags = parent::_getCacheTags();
690-
$tags[] = Mage_Core_Model_App::CACHE_TAG;
691690
$tags[] = self::CACHE_TAG;
692691
return $tags;
693692
}

0 commit comments

Comments
 (0)