Esempio n. 1
0
 public function gc($expires = null)
 {
     return Cache::gc($this->cacheKey) && parent::gc($expires);
 }
 /**
  * test the garbage collector
  *
  * @return void
  */
 public function testGc()
 {
     TableRegistry::clear();
     ini_set('session.gc_maxlifetime', 0);
     $storage = new DatabaseSession();
     $storage->write('foo', 'Some value');
     sleep(1);
     $storage->gc(0);
     $this->assertSame('', $storage->read('foo'));
 }
 /**
  * test the garbage collector
  *
  * @return void
  */
 public function testGc()
 {
     TableRegistry::clear();
     Configure::write('Session.timeout', 0);
     $storage = new DatabaseSession();
     $storage->write('foo', 'Some value');
     sleep(1);
     $storage->gc(0);
     $this->assertFalse($storage->read('foo'));
 }