Skip to content

Commit 5b0667c

Browse files
authored
Merge pull request #1610 from magento-chaika/chaika-pr1
Fixed issue: MAGETWO-72798 [Backport] - Website doesn't work with Redis cache installed and PhpRedis extension enabled - for 2.1
2 parents f4da450 + 62477e3 commit 5b0667c

File tree

3 files changed

+73
-54
lines changed

3 files changed

+73
-54
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"zendframework/zend-log": "~2.4.6",
3333
"zendframework/zend-http": "~2.4.6",
3434
"magento/zendframework1": "~1.12.16",
35-
"colinmollenhour/credis": "1.6",
36-
"colinmollenhour/php-redis-session-abstract": "1.2",
35+
"colinmollenhour/credis": "1.8.2",
36+
"colinmollenhour/php-redis-session-abstract": "1.3.4",
3737
"colinmollenhour/cache-backend-redis": "1.9",
3838
"colinmollenhour/cache-backend-file": "1.4",
3939
"composer/composer": "<=1.0.0-beta1",

composer.lock

Lines changed: 52 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/internal/Magento/Framework/Session/SaveHandler/Redis/Config.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ class Config implements \Cm\RedisSession\Handler\ConfigInterface
115115
*/
116116
const SESSION_MAX_LIFETIME = 31536000;
117117

118+
/**
119+
* Try to break lock for at most this many seconds
120+
*/
121+
const DEFAULT_FAIL_AFTER = 15;
122+
118123
/**
119124
* Deployment config
120125
*
@@ -127,6 +132,11 @@ class Config implements \Cm\RedisSession\Handler\ConfigInterface
127132
*/
128133
private $scopeConfig;
129134

135+
/**
136+
* @var State
137+
*/
138+
private $appState;
139+
130140
/**
131141
* @param DeploymentConfig $deploymentConfig
132142
* @param State $appState
@@ -288,4 +298,13 @@ public function getLifetime()
288298
}
289299
return (int)$this->scopeConfig->getValue(self::XML_PATH_COOKIE_LIFETIME, StoreScopeInterface::SCOPE_STORE);
290300
}
301+
302+
/**
303+
* Get number of seconds to wait before completely failing to break the lock
304+
* @return int
305+
*/
306+
public function getFailAfter()
307+
{
308+
return self::DEFAULT_FAIL_AFTER;
309+
}
291310
}

0 commit comments

Comments
 (0)