dec() public static méthode

自减缓存(针对数值缓存)
public static dec ( string $name, integer $step = 1 ) : false | integer
$name string 缓存变量名
$step integer 步长
Résultat false | integer
 public function testStaticCall()
 {
     $this->assertTrue(Cache::set('a', 1));
     $this->assertEquals(1, Cache::get('a'));
     $this->assertEquals(2, Cache::inc('a'));
     $this->assertEquals(4, Cache::inc('a', 2));
     $this->assertEquals(4, Cache::get('a'));
     $this->assertEquals(3, Cache::dec('a'));
     $this->assertEquals(1, Cache::dec('a', 2));
     $this->assertEquals(1, Cache::get('a'));
     $this->assertNotNull(Cache::rm('a'));
     $this->assertNotNull(Cache::clear());
 }