Exemplo n.º 1
0
 /**
  * Check if a file exists on the remote.
  *
  * Returns null if caching isn't available (and unsure), else a boolean value
  *
  * @param string $key
  *
  * @return bool|null
  */
 protected function tagExists($key)
 {
     if (!$this->cache_pool) {
         return null;
     }
     $item = $this->cache_pool->getItem('remote.' . $key);
     return $item->exists();
 }
Exemplo n.º 2
0
 /**
  * Test invalid TTL values throw exceptions
  *
  * @dataProvider poolProvider
  * @param PoolInterface $pool
  * @expectedException \InvalidArgumentException
  */
 public function testInvalidTtl(PoolInterface $pool)
 {
     $item = $pool->getItem('test');
     $item->set('value', "hiya!");
 }