예제 #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();
 }
예제 #2
0
파일: DriverTest.php 프로젝트: bravo3/cache
 /**
  * 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!");
 }