GetUseCache() public method

Returns true if cache use was enabled
public GetUseCache ( ) : boolean
return boolean
Exemplo n.º 1
0
 /**
  * Writes the object to cache.
  *
  * @return bool
  *    TRUE on success, FALSE on failure
  */
 public function writeCache()
 {
     if (!DatabaseObject::GetUseCache() || !$this->m_exists) {
         return false;
     }
     $cacheKey = $this->getCacheKey();
     if ($cacheKey === false) {
         return false;
     }
     $cacheObj = CampCache::singleton();
     return $cacheObj->add($cacheKey, $this);
 }