修正Cache类和改进单元测试

This commit is contained in:
thinkphp
2016-07-31 09:43:09 +08:00
parent b2275a1d87
commit 609d3c76a7
2 changed files with 11 additions and 4 deletions

View File

@@ -118,7 +118,7 @@ class Cache
* @param int $expire 有效时间 0为永久
* @return false|int
*/
public function inc($name, $step = 1, $expire = null)
public static function inc($name, $step = 1, $expire = null)
{
self::init();
self::$writeTimes++;
@@ -133,7 +133,7 @@ class Cache
* @param int $expire 有效时间 0为永久
* @return false|int
*/
public function dec($name, $step = 1, $expire = null)
public static function dec($name, $step = 1, $expire = null)
{
self::init();
self::$writeTimes++;