public function testDelete() { $this->cache->set('key', 'value'); $this->bufferedCache->delete('key'); // check that the value has been deleted from bufferedcache (only) $this->assertEquals(false, $this->bufferedCache->get('key')); $this->assertEquals('value', $this->cache->get('key')); $this->bufferedCache->commit(); // check that the value has also been deleted from real cache $this->assertEquals(false, $this->bufferedCache->get('key')); $this->assertEquals(false, $this->cache->get('key')); }
/** * @param string $key * @param int $time * @return bool */ public function delete($key, $time = 0) { return $this->cache->delete($key, $time); }