Ensure that clear() returns bool in all cache drivers

This commit is contained in:
Kijin Sung 2016-04-21 22:32:33 +09:00
parent 7beaff8241
commit 115ffa937e
3 changed files with 4 additions and 1 deletions

View file

@ -179,5 +179,6 @@ class Dummy implements \Rhymix\Framework\Drivers\CacheInterface
public function clear()
{
$this->data = array();
return true;
}
}

View file

@ -171,7 +171,7 @@ class File implements \Rhymix\Framework\Drivers\CacheInterface
*/
public function clear()
{
Storage::deleteDirectory($this->_dir);
return Storage::deleteDirectory($this->_dir) ? true : false;
}
/**

View file

@ -242,5 +242,7 @@ class SQLite implements \Rhymix\Framework\Drivers\CacheInterface
{
$this->_dbh->exec('CREATE TABLE cache_' . $i . ' (k TEXT PRIMARY KEY, v TEXT, exp INT)');
}
return true;
}
}