/** * {@inheritdoc} */ public function set($key, $data, $ttl = 0) { $result = $this->cache->set($key, $data, $ttl); if ($result) { $this->hot[$key] = $data; } return $result; }
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')); }