Add dummy cache driver to use if no cache is configured

This commit is contained in:
Kijin Sung 2016-04-17 16:44:38 +09:00
parent ca56ff474f
commit b8db18a242
4 changed files with 183 additions and 2 deletions

View file

@ -138,7 +138,7 @@ class File implements \Rhymix\Framework\Drivers\CacheInterface
public function incr($key, $amount)
{
$value = intval($this->get($key));
$success = $this->set($key, $value + $amount);
$success = $this->set($key, $value + $amount, 0);
return $success ? ($value + $amount) : false;
}