clear() public method

Clears the current Item. If hierarchical or "stackable" caching is being used this function will also remove children Items.
public clear ( ) : boolean
return boolean
Beispiel #1
0
 /**
  * {@inheritdoc}
  */
 public function signOut()
 {
     $token = $this->tokenCache->get();
     if ($token && !$this->tokenCache->isMiss()) {
         $this->getClient()->get('https://identity.auth.theplatform.com/idm/web/Authentication/signOut', array('query' => array('schema' => '1.0', 'form' => 'json', '_token' => $token)));
         $this->getLogger()->info('Expired mpx authentication token {token} for {username}.', array('token' => $token, 'username' => $this->getUsername()));
     }
     $this->tokenCache->clear();
 }
 private function assertDisabledStash(\Stash\Interfaces\ItemInterface $item)
 {
     $this->assertFalse($item->set('true'), 'storeData returns false for disabled cache');
     $this->assertNull($item->get(), 'getData returns null for disabled cache');
     $this->assertFalse($item->clear(), 'clear returns false for disabled cache');
     $this->assertTrue($item->isMiss(), 'isMiss returns true for disabled cache');
     $this->assertFalse($item->extend(), 'extend returns false for disabled cache');
     $this->assertTrue($item->lock(100), 'lock returns true for disabled cache');
 }