public function testMetaDataFailure() { $storage = new ezcCacheStorageFileApcArray($this->getTempDir(__CLASS__), array('ttl' => 1)); $storage->reset(); $metaDataKey = urlencode($storage->getLocation()) . '_' . $storage->options->metaDataKey; $this->assertFalse(apc_fetch($metaDataKey), 'Meta data file existed before the storage was created.'); $restoredMeta = $storage->restoreMetaData(); $this->assertNull($restoredMeta, 'Meta data not restored correctly.'); $this->assertFalse(apc_fetch($metaDataKey), 'Meta data file existed before the storage was created.'); $this->removeTempDir(); }
/** * Calculates the lifetime remaining for a cache object. * * @param string $filename The file to calculate the remaining lifetime for * @param bool $useApc Use APC or not * @return int The remaining lifetime in seconds (0 if no time remaining) */ public function calcLifetime($filename, $useApc = false) { return parent::calcLifetime($filename, $useApc); }