
Public Member Functions | |
| __construct ($group) | |
| call () | |
Private Member Functions | |
| encodeID ($id) | |
Definition at line 86 of file aliroCache.php.
| aliroCache::__construct | ( | $ | group | ) |
Reimplemented from aliroSimpleCache.
Definition at line 88 of file aliroCache.php.
References aliroSimpleCache::$group, and aliroCore::getInstance().
00088 { 00089 $this->caching = aliroCore::getInstance()->getCfg('caching') ? true : false; 00090 parent::__construct($group); 00091 }
| aliroCache::call | ( | ) |
Definition at line 93 of file aliroCache.php.
References aliroPathway::getInstance(), aliroRequest::getInstance(), and aliroSimpleCache::save().
00093 { 00094 $arguments = func_get_args(); 00095 $cached = $this->caching ? $this->get($arguments) : null; 00096 if (!$cached) { 00097 ob_start(); 00098 ob_implicit_flush(false); 00099 $function = array_shift($arguments); 00100 call_user_func_array($function, $arguments); 00101 $html = ob_get_contents(); 00102 ob_end_clean(); 00103 $cached = new stdClass(); 00104 $cached->html = $html; 00105 if ($this->caching) { 00106 aliroRequest::getInstance()->setMetadataInCache($cached); 00107 $cached->pathway = aliroPathway::getInstance()->getPathway(); 00108 $this->save($cached); 00109 } 00110 } 00111 else { 00112 aliroRequest::getInstance()->setMetadataFromCache($cached); 00113 aliroPathway::getInstance()->setPathway($cached->pathway); 00114 } 00115 echo $cached->html; 00116 }
| aliroCache::encodeID | ( | $ | id | ) | [private] |
Reimplemented from aliroSimpleCache.
Definition at line 118 of file aliroCache.php.
References aliroRequest::getInstance().
00118 { 00119 return md5(serialize($id).aliroRequest::getInstance()->getCfg('live_site')); 00120 }
1.5.5