storeData() public method

Same as store() but expanded parameters
See also: store()
public storeData ( CacheData $data, number $lifetime ) : boolean
$data CacheData
$lifetime number
return boolean true if no problem
Esempio n. 1
0
 public function clear(CacheAbstract $cache)
 {
     $key = new CacheKey('clear', 'it');
     $cd = new CacheData($key, 789);
     $this->assertTrue($cache->storeData($cd));
     $cache->clear();
     try {
         $cache->get($key);
         $this->fail();
     } catch (Cachearium\Exceptions\NotCachedException $e) {
         $this->assertTrue(true);
     }
 }