isMiss() публичный Метод

Returns true if the cached item needs to be refreshed.
public isMiss ( ) : boolean
Результат boolean
Пример #1
0
 function it_expands_a_url(Provider $provider, PoolInterface $pool, ItemInterface $item)
 {
     $item->isMiss()->willReturn(true);
     $item->set('http://any.url')->shouldBeCalled();
     $pool->getItem(md5('http://short.ly/1234'))->willReturn($item);
     $provider->expand('http://short.ly/1234')->willReturn('http://any.url');
     $this->expand('http://short.ly/1234')->shouldReturn('http://any.url');
 }
Пример #2
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();
 }
Пример #3
0
 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');
 }