示例#1
0
 /**
  * {@inheritdoc}
  */
 public function set($key, $data, $ttl = 0)
 {
     $result = $this->cache->set($key, $data, $ttl);
     if ($result) {
         $this->hot[$key] = $data;
     }
     return $result;
 }
示例#2
0
 public function testFlush()
 {
     $this->cache->set('test', 'data');
     $this->assertEquals('data', $this->cache->get('test'));
     $this->assertTrue($this->cache->flush());
     $this->assertFalse($this->cache->get('data'));
 }