mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-12 07:11:42 +09:00
Ensure that clear() returns bool in all cache drivers
This commit is contained in:
parent
7beaff8241
commit
115ffa937e
3 changed files with 4 additions and 1 deletions
1
common/framework/drivers/cache/dummy.php
vendored
1
common/framework/drivers/cache/dummy.php
vendored
|
|
@ -179,5 +179,6 @@ class Dummy implements \Rhymix\Framework\Drivers\CacheInterface
|
|||
public function clear()
|
||||
{
|
||||
$this->data = array();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
common/framework/drivers/cache/file.php
vendored
2
common/framework/drivers/cache/file.php
vendored
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
2
common/framework/drivers/cache/sqlite.php
vendored
2
common/framework/drivers/cache/sqlite.php
vendored
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue