Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 0c46ea6

Browse files
author
Sergey Shvets
committed
MAGETWO-67097: Website doesn't work with Redis cache installed and PhpRedis extension enabled
1 parent e442de5 commit 0c46ea6

File tree

3 files changed

+35
-16
lines changed

3 files changed

+35
-16
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
"zendframework/zend-captcha": "^2.7.1",
3636
"zendframework/zend-session": "^2.7.3",
3737
"magento/zendframework1": "~1.13.0",
38-
"colinmollenhour/credis": "1.6",
39-
"colinmollenhour/php-redis-session-abstract": "~1.2.2",
38+
"colinmollenhour/credis": "1.8.2",
39+
"colinmollenhour/php-redis-session-abstract": "1.3.4",
4040
"colinmollenhour/cache-backend-redis": "1.10.2",
4141
"colinmollenhour/cache-backend-file": "1.4",
4242
"composer/composer": "1.4.1",

composer.lock

Lines changed: 15 additions & 14 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: 18 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,12 @@ public function getLifetime()
288298
}
289299
return (int)$this->scopeConfig->getValue(self::XML_PATH_COOKIE_LIFETIME, StoreScopeInterface::SCOPE_STORE);
290300
}
301+
302+
/**
303+
* {@inheritdoc}
304+
*/
305+
public function getFailAfter()
306+
{
307+
return self::DEFAULT_FAIL_AFTER;
308+
}
291309
}

0 commit comments

Comments
 (0)