public function garbage() { jCache::garbage('jforms'); foreach ($this->containers as $key => $container) { if (!jCache::get($key, 'jforms')) { unset($this->containers[$key]); } } }
public function testGarbage() { $this->assertFalse(jCache::garbage()); jCache::set('remainingDataKey', 'remaining data', 0, $this->profile); jCache::set('garbage1DataKey', 'data send to the garbage', 1, $this->profile); jCache::set('garbage2DataKey', 'other data send to the garbage', strtotime("-1 day"), $this->profile); sleep(2); $this->assertTrue(jCache::garbage($this->profile)); }
public function testGarbage() { parent::testGarbage(); $this->assertFalse(jCache::garbage()); $this->assertTableContainsRecords('jlx_cache', array(array('cache_key' => 'remainingDataKey', 'cache_data' => serialize('remaining data'), 'cache_date' => null))); }