Skip to content

Commit cbbdec8

Browse files
committed
ACP2E-3010: PHPSESSID is changing each POST Request
1 parent c893121 commit cbbdec8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

lib/internal/Magento/Framework/Cache/Backend/RemoteSynchronizedCache.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,9 @@ public function load($id, $doNotTestCacheValidity = false)
223223
*/
224224
public function test($id)
225225
{
226-
return $this->local->test($id) ?? $this->remote->test($id);
226+
return $this->_options['use_stale_cache'] ?
227+
($this->local->test($id) ?? $this->remote->test($id))
228+
: $this->remote->test($id);
227229
}
228230

229231
/**

lib/internal/Magento/Framework/Cache/Test/Unit/Backend/RemoteSynchronizedCacheTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,4 +413,16 @@ public function testSaveWithoutRemoteData(): void
413413

414414
$this->remoteSyncCacheInstance->save(1, 1);
415415
}
416+
417+
public function testTest(): void
418+
{
419+
$this->localCacheMockExample
420+
->method('test')
421+
->willReturn(true);
422+
$this->remoteCacheMockExample
423+
->method('test')
424+
->willReturn(false);
425+
426+
$this->assertFalse($this->remoteSyncCacheInstance->test(1));
427+
}
416428
}

0 commit comments

Comments
 (0)