Пример #1
0
 /**
  * Generates the xml by pulling it from cache or generating it
  * @return string
  */
 function Generate()
 {
     if ($this->cacher->MustUseCache()) {
         $this->xml = $this->cacher->GetFromCache();
         return;
     }
     $this->AddAllPages();
     $this->xml = $this->sitemap->SaveXml();
     if ($this->cacher->MustStoreToCache()) {
         $this->cacher->StoreToCache($this->xml);
     }
 }
Пример #2
0
 /**
  * Stores to cache if necessary
  */
 protected function AfterGather()
 {
     if ($this->fileCacher->MustStoreToCache()) {
         $this->fileCacher->StoreToCache($this->output);
     }
     parent::AfterGather();
 }