示例#1
0
 public function testDecrement()
 {
     $this->key->getRediska()->set($this->key->getName(), 123);
     $reply = $this->key->decrement(2);
     $this->assertEquals(121, $reply);
     $reply = $this->key->getRediska()->get($this->key->getName());
     $this->assertEquals(121, $reply);
 }
示例#2
0
文件: Redis.php 项目: kvz/eventcache
 public function decrement($key, $val = 1)
 {
     $Key = new Rediska_Key($key);
     $Key->setRediska($this->Rediska);
     return $Key->decrement($val);
 }