/** * 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); } }
/** * Stores to cache if necessary */ protected function AfterGather() { if ($this->fileCacher->MustStoreToCache()) { $this->fileCacher->StoreToCache($this->output); } parent::AfterGather(); }