Changeset 2169
- Timestamp:
- 11/02/07 14:11:47 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/src/filter/AgaviExecutionFilter.class.php
r2117 r2169 88 88 $group = base64_encode($group); 89 89 } 90 return unserialize(file_get_contents(AgaviConfig::get('core.cache_dir') . DIRECTORY_SEPARATOR . self::CACHE_SUBDIR . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $groups) . '.cefcache')); 90 $filename = AgaviConfig::get('core.cache_dir') . DIRECTORY_SEPARATOR . self::CACHE_SUBDIR . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $groups) . '.cefcache'; 91 $data = file_get_contents($filename); 92 if($data !== false) { 93 return unserialize($data); 94 } else { 95 throw new AgaviException(sprintf('Failed to read cache file "%s"', $filename)); 96 } 91 97 } 92 98 … … 272 278 // $lm->log('Action is cached, loading...'); 273 279 // cache/dir/4-8-15-16-23-42 contains the action cache 274 $actionCache = $this->readCache(array_merge($groups, array(self::ACTION_CACHE_ID))); 275 } else { 280 try { 281 $actionCache = $this->readCache(array_merge($groups, array(self::ACTION_CACHE_ID))); 282 } catch(AgaviException $e) { 283 $isActionCached = false; 284 } 285 } 286 if(!$isActionCached) { 287 $actionCache = array(); 288 276 289 // $lm->log('Action not cached, executing...'); 277 290 // execute the Action and get the View to execute … … 331 344 if($isViewCached) { 332 345 // $lm->log('View is cached, loading...'); 333 $viewCache = $this->readCache(array_merge($groups, array($outputType))); 334 } else { 346 try { 347 $viewCache = $this->readCache(array_merge($groups, array($outputType))); 348 } catch(AgaviException $e) { 349 $isViewCached = false; 350 } 351 } 352 if(!$isViewCached) { 335 353 $viewCache = array(); 336 354

