Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into kirkmadera-github-1…
Browse files Browse the repository at this point in the history
…27-installs-into-app-code-local-Cm-RedisSession-code
  • Loading branch information
colinmollenhour committed Mar 8, 2018
2 parents 66c6c9d + 36c9cb4 commit e8354db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ Be aware that if the `<max_lifetime>` setting is below your Cookie Lifetime, the

## Installation ##

This extension can be installed with either Composer or modman.

The Magento Compiler feature is currently not supported.

#### Modman Installation ####

1. Install module using [modman](https://github.com/colinmollenhour/modman):

modman clone https://github.com/colinmollenhour/Cm_RedisSession
Expand Down Expand Up @@ -75,6 +81,7 @@ Be aware that if the `<max_lifetime>` setting is below your Cookie Lifetime, the
<disable_locking>0</disable_locking> <!-- Disable session locking entirely. -->
<min_lifetime>60</min_lifetime> <!-- Set the minimum session lifetime -->
<max_lifetime>2592000</max_lifetime> <!-- Set the maximum session lifetime -->
<log_exceptions>0</log_exceptions> <!-- Log connection failure and concurrent connection exceptions in exception.log. -->
</redis_session>
...
</global>
Expand Down
14 changes: 10 additions & 4 deletions app/code/local/Cm/RedisSession/Model/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Cm_RedisSession_Model_Session implements \Zend_Session_SaveHandler_Interfa
/**
* @var \Cm\RedisSession\Handler
*/
private $sessionHandler;
protected $sessionHandler;

public function __construct()
{
Expand Down Expand Up @@ -170,10 +170,16 @@ public function gc($maxLifeTime)
* @param \Exception $e
* @return void
*/
private function handleException(\Exception $e)
protected function handleException(\Exception $e)
{
Mage::logException($e);
require_once Mage::getBaseDir() . DS . 'errors' . DS . '503.php';
if (Mage::getConfig()->getNode('global/redis_session')->is('log_exceptions')) {
Mage::logException($e);
}
if ($e instanceof \Cm\RedisSession\ConcurrentConnectionsExceededException) {
require_once Mage::getBaseDir() . DS . 'errors' . DS . '503.php';
} else {
Mage::printException($e);
}
exit;
}
}

0 comments on commit e8354db

Please sign in to comment.