RedisSessionHandler: refactoring