Working on this RedisModel class
Got it working fairly well, just trying to get all of my assumption / opinions baked in. Still need to come up with a decent way to generate session hashes to help avoid session collision . Incidentally Retwis seems to be susceptible to this.
This commit is contained in:
parent
7063b7aafe
commit
9fe9eb7acf
5 changed files with 140 additions and 38 deletions
|
@ -12,7 +12,7 @@ class CustomRedis extends Object
|
|||
|
||||
try
|
||||
{
|
||||
$this->redis = new Redis();
|
||||
$this->redis = parent::getInstance('Redis'); // new Redis();
|
||||
$this->redis->connect($datasource['hostname'], $datasource['port']);
|
||||
$this->redis->setOption(Redis::OPT_PREFIX, $datasource['namespace'] . ':');
|
||||
$this->redis->select($datasource['database']);
|
||||
|
@ -23,6 +23,8 @@ class CustomRedis extends Object
|
|||
}
|
||||
}
|
||||
|
||||
//var_dump($name, $arguments);
|
||||
|
||||
return call_user_func_array(array($this->redis, $name), $arguments);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue