Exemple #1
0
 /**
  * Test if a cache is available for the given id
  *
  * @param  string $id Cache id
  * @return int|false Last modified time of cache entry if it is available, false otherwise
  */
 public function test($id)
 {
     if (!$this->_options['caching']) {
         return false;
     }
     $id = $this->_id($id); // cache id may need prefix
     self::_validateIdOrTag($id);
     $this->_lastId = $id;
     return $this->_backend->test($id);
 }
 /**
  * Test if a cache is available for the given id
  *
  * @param  string $id Cache id
  * @return int|false Last modified time of cache entry if it is available, false otherwise
  */
 public function test($id)
 {
     if (!$this->_options['caching']) {
         return false;
     }
     $id = $this->_id($id);
     // cache id may need prefix
     self::_validateIdOrTag($id);
     $this->_lastId = $id;
     $this->_log("Zend_Cache_Core: test item '{$id}'", 7);
     return $this->_backend->test($id);
 }
Exemple #3
0
 /**
  * Returns true if and only if storage is empty
  *
  * @throws Zend_Auth_Storage_Exception If it is impossible to determine whether storage is empty
  * @return boolean
  */
 public function isEmpty()
 {
     return !$this->_backend->test($this->_id);
 }