/** * 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); }