Lines Matching full:cache

24 …'desc'   => 'Takes an api URL, checks local cache for up-to-date, then returns cache path for use …
32 … 'desc' => 'returns true if the cache is up-to-date. Includes API call if required',
35 'cache (optional)' => 'class'
41 … 'desc' => 'makes the API call given by apiUrl. Saves result in a cache after formatting',
44 'cache (optional)' => 'class'
58 'desc' => 'returns rendered output from an API request, using cache if valid',
66 …// Master cache checker. First checks if the cache expired, then checks if the page is older than…
68 $cache = new cache_ghissues_api($apiURL);
69 $this->checkCacheFreshness($apiURL, $cache);
70 return ($cache->cache);
74 public function checkCacheFreshness($apiURL, &$cache=NULL) { argument
76 if ( !isset($cache) ) {
77 $cache = new cache_ghissues_api($apiURL);
80 // Check if we've done a cached API call recently. If you have, the cache is plenty fresh
81 if ( $cache->sniffETag($this->getConf('ghissuerefresh')) ) return true;
83 // Old cache, time to check in with GH.
84 return $this->callGithubAPI($apiURL, $cache);
88 public function callGithubAPI($apiURL, &$cache=NULL) { argument
90 if ( !isset($cache) ) {
91 $cache = new cache_ghissues_api($apiURL);
109 $lastETag = $cache->retrieveETag();
110 //dbglog('ghissues: Cache etag retrieval: '.$lastETag);
130 $cache->storeETag($apiHead['etag']); // Update the last time we checked
145 // things we don't check updated. If that is the case, no need to change the cache
148 if ( $newTable != $cache->retrieveCache() ) {
149 if (!$cache->storeCache($newTable)) {
150 …//dbglog('ghissues: Unable to save cache file. Hint: disk full; file permissions; safe_mode settin…
151 return true; // Couldn't save the update, can't reread from new cache
153 $cache->storeETag($apiHead['etag']); // Update the last time we checked
156 $cache->storeETag($apiHead['etag']); // Update the last time we checked
160 // $cache->storeETag($apiHead['etag']); // Update the last time we checked
164 $errorTable .= '</div>'."\n".$cache->retrieveCache();
166 if (!$cache->storeCache($errorTable)) {
167 …//dbglog('ghissues: Unable to save cache file. Hint: disk full; file permissions; safe_mode settin…
168 return true; // Couldn't save the update, can't reread from new cache
268 class cache_ghissues_api extends cache {
273 parent::cache($requestURL,'.ghissues');
274 $this->etag = substr($this->cache, 0, -9).'.etag';
291 if (!($this->_etag_time = @filemtime($this->etag))) return false; // Check if cache is there