Changeset 1112
- Timestamp:
- 12/05/07 16:44:12 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/websites/cache/stubAbstractWebsiteCache.php
r1109 r1112 55 55 $cacheKey = $this->generateCacheKey($page); 56 56 if ($this->isCached($cacheKey) === false) { 57 $this->log($ cacheKey, 'miss');57 $this->log($page, $cacheKey, stubWebsiteCache::MISS); 58 58 return false; 59 59 } … … 64 64 65 65 if ($this->doRetrieve($request, $response, $cacheKey) === true) { 66 $this->log($ cacheKey, stubWebsiteCache::HIT);66 $this->log($page, $cacheKey, stubWebsiteCache::HIT); 67 67 return true; 68 68 } 69 69 70 $this->log($ cacheKey, stubWebsiteCache::MISS);70 $this->log($page, $cacheKey, stubWebsiteCache::MISS); 71 71 return false; 72 72 } … … 163 163 * helper method to log cache acticity 164 164 * 165 * @param string $page name of page 165 166 * @param string $cacheKey key for cache data 166 167 * @param string $type 'hit' or 'miss' 167 168 */ 168 protected function log($ cacheKey, $type)169 protected function log($page, $cacheKey, $type) 169 170 { 170 171 $logData = stubLogDataFactory::create('cache', stubLogger::LEVEL_INFO); 171 $logData->addData($ this->page);172 $logData->addData($page); 172 173 $logData->addData($type); 173 174 $logData->addData($this->getClassName()); trunk/src/main/php/net/stubbles/websites/cache/stubDefaultWebsiteCache.php
r1109 r1112 132 132 * @return bool 133 133 */ 134 protected abstractfunction isUsedFilesCheckEnabled()134 protected function isUsedFilesCheckEnabled() 135 135 { 136 136 return $this->checkFiles; trunk/src/main/php/net/stubbles/websites/cache/stubGzipWebsiteCache.php
r1109 r1112 33 33 { 34 34 $this->websiteCache = $websiteCache; 35 $this->cache = $this->websiteCache->getCacheContainer(); 35 36 } 36 37 … … 171 172 public function store(stubRequest $request, stubResponse $response, $page) 172 173 { 173 if (parent::store($request, $response, $page) === true) { 174 return true; 175 } 176 174 parent::store($request, $response, $page); 177 175 return $this->websiteCache->store($request, $response, $page); 178 176 } … … 219 217 * @return bool 220 218 */ 221 protected abstractfunction isUsedFilesCheckEnabled()219 protected function isUsedFilesCheckEnabled() 222 220 { 223 221 return $this->websiteCache->isUsedFilesCheckEnabled();
