Пример #1
0
 public function garbage()
 {
     jCache::garbage('jforms');
     foreach ($this->containers as $key => $container) {
         if (!jCache::get($key, 'jforms')) {
             unset($this->containers[$key]);
         }
     }
 }
Пример #2
0
 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));
 }
Пример #3
0
 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)));
 }