Skip to content

Commit e47d6b0

Browse files
authored
MCLOUD-6659: Update Redis L2 cache patch (magento#74)
1 parent e002977 commit e47d6b0

10 files changed

+33
-8
lines changed

patches.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@
254254
"2.3.3": "MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.3.patch",
255255
">=2.3.3-p1 <2.3.4": "MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.3-p1.patch",
256256
">=2.3.4 <2.3.5": "MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.4.patch",
257-
">=2.3.5 <2.3.6": "MCLOUD-6211__redis_improvement_patches__2.3.5.patch"
257+
">=2.3.5 <2.3.6": "MCLOUD-6211__redis_improvement_patches__2.3.5.patch",
258+
">=2.4.0 <2.4.1": "MCLOUD-6659__fix_L2_redis_cache__2.4.0.patch"
258259
}
259260
},
260261
"magento/module-paypal": {

patches/MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.0.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,7 @@ diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
17981798
+ $dataToSave = $data;
17991799
+ $remHash = $this->loadRemoteDataVersion($id);
18001800
+
1801-
+ if ($remHash !== false) {
1801+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
18021802
+ $dataToSave = $this->remote->load($id);
18031803
+ } else {
18041804
+ $this->remote->save($data, $id, $tags, $specificLifetime);

patches/MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.1.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,7 @@ diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
17421742
+ $dataToSave = $data;
17431743
+ $remHash = $this->loadRemoteDataVersion($id);
17441744
+
1745-
+ if ($remHash !== false) {
1745+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
17461746
+ $dataToSave = $this->remote->load($id);
17471747
+ } else {
17481748
+ $this->remote->save($data, $id, $tags, $specificLifetime);

patches/MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.2.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
843843
+ $dataToSave = $data;
844844
+ $remHash = $this->loadRemoteDataVersion($id);
845845
+
846-
+ if ($remHash !== false) {
846+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
847847
+ $dataToSave = $this->remote->load($id);
848848
+ } else {
849849
+ $this->remote->save($data, $id, $tags, $specificLifetime);

patches/MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.3-p1.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
844844
+ $dataToSave = $data;
845845
+ $remHash = $this->loadRemoteDataVersion($id);
846846
+
847-
+ if ($remHash !== false) {
847+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
848848
+ $dataToSave = $this->remote->load($id);
849849
+ } else {
850850
+ $this->remote->save($data, $id, $tags, $specificLifetime);

patches/MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.3.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
844844
+ $dataToSave = $data;
845845
+ $remHash = $this->loadRemoteDataVersion($id);
846846
+
847-
+ if ($remHash !== false) {
847+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
848848
+ $dataToSave = $this->remote->load($id);
849849
+ } else {
850850
+ $this->remote->save($data, $id, $tags, $specificLifetime);

patches/MCLOUD-6139_MCLOUD-6211__redis_improvement_patches__2.3.4.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
558558
+ $dataToSave = $data;
559559
+ $remHash = $this->loadRemoteDataVersion($id);
560560
+
561-
+ if ($remHash !== false) {
561+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
562562
+ $dataToSave = $this->remote->load($id);
563563
+ } else {
564564
+ $this->remote->save($data, $id, $tags, $specificLifetime);

patches/MCLOUD-6211__redis_improvement_patches__2.3.5.patch

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,3 +380,15 @@ diff -Nuar a/setup/src/Magento/Setup/Model/ConfigOptionsList/PageCache.php b/set
380380
+ return substr(\hash('sha256', dirname(__DIR__, 6)), 0, 3) . '_';
381381
}
382382
}
383+
diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php b/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
384+
--- a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
385+
+++ b/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
386+
@@ -205,7 +205,7 @@ class RemoteSynchronizedCache extends \Zend_Cache_Backend implements \Zend_Cache
387+
$dataToSave = $data;
388+
$remHash = $this->loadRemoteDataVersion($id);
389+
390+
- if ($remHash !== false) {
391+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
392+
$dataToSave = $this->remote->load($id);
393+
} else {
394+
$this->remote->save($data, $id, $tags, $specificLifetime);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff -Nuar a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php b/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
2+
--- a/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
3+
+++ b/vendor/magento/framework/Cache/Backend/RemoteSynchronizedCache.php
4+
@@ -205,7 +205,7 @@ class RemoteSynchronizedCache extends \Zend_Cache_Backend implements \Zend_Cache
5+
$dataToSave = $data;
6+
$remHash = $this->loadRemoteDataVersion($id);
7+
8+
- if ($remHash !== false) {
9+
+ if ($remHash !== false && $this->getDataVersion($data) === $remHash) {
10+
$dataToSave = $this->remote->load($id);
11+
} else {
12+
$this->remote->save($data, $id, $tags, $specificLifetime);

src/Test/Functional/Acceptance/AcceptanceCest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Magento\CloudPatches\Test\Functional\Acceptance;
99

1010
/**
11-
* @group php73
11+
* @group php74
1212
*/
1313
class AcceptanceCest extends AbstractCest
1414
{

0 commit comments

Comments
 (0)