Changeset 1112

Show
Ignore:
Timestamp:
12/05/07 16:44:12 (1 year ago)
Author:
mikey
Message:

fixes to make classes usable for runtime evaluation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/main/php/net/stubbles/websites/cache/stubAbstractWebsiteCache.php

    r1109 r1112  
    5555        $cacheKey = $this->generateCacheKey($page); 
    5656        if ($this->isCached($cacheKey) === false) { 
    57             $this->log($cacheKey, 'miss'); 
     57            $this->log($page, $cacheKey, stubWebsiteCache::MISS); 
    5858            return false; 
    5959        } 
     
    6464         
    6565        if ($this->doRetrieve($request, $response, $cacheKey) === true) { 
    66             $this->log($cacheKey, stubWebsiteCache::HIT); 
     66            $this->log($page, $cacheKey, stubWebsiteCache::HIT); 
    6767            return true; 
    6868        } 
    6969         
    70         $this->log($cacheKey, stubWebsiteCache::MISS); 
     70        $this->log($page, $cacheKey, stubWebsiteCache::MISS); 
    7171        return false; 
    7272    } 
     
    163163     * helper method to log cache acticity 
    164164     * 
     165     * @param  string  $page      name of page 
    165166     * @param  string  $cacheKey  key for cache data 
    166167     * @param  string  $type      'hit' or 'miss' 
    167168     */ 
    168     protected function log($cacheKey, $type) 
     169    protected function log($page, $cacheKey, $type) 
    169170    { 
    170171        $logData  = stubLogDataFactory::create('cache', stubLogger::LEVEL_INFO); 
    171         $logData->addData($this->page); 
     172        $logData->addData($page); 
    172173        $logData->addData($type); 
    173174        $logData->addData($this->getClassName()); 
  • trunk/src/main/php/net/stubbles/websites/cache/stubDefaultWebsiteCache.php

    r1109 r1112  
    132132     * @return  bool 
    133133     */ 
    134     protected abstract function isUsedFilesCheckEnabled() 
     134    protected function isUsedFilesCheckEnabled() 
    135135    { 
    136136        return $this->checkFiles; 
  • trunk/src/main/php/net/stubbles/websites/cache/stubGzipWebsiteCache.php

    r1109 r1112  
    3333    { 
    3434        $this->websiteCache = $websiteCache; 
     35        $this->cache        = $this->websiteCache->getCacheContainer(); 
    3536    } 
    3637 
     
    171172    public function store(stubRequest $request, stubResponse $response, $page) 
    172173    { 
    173         if (parent::store($request, $response, $page) === true) { 
    174             return true; 
    175         } 
    176          
     174        parent::store($request, $response, $page); 
    177175        return $this->websiteCache->store($request, $response, $page); 
    178176    } 
     
    219217     * @return  bool 
    220218     */ 
    221     protected abstract function isUsedFilesCheckEnabled() 
     219    protected function isUsedFilesCheckEnabled() 
    222220    { 
    223221        return $this->websiteCache->isUsedFilesCheckEnabled();