/** * Remove all pages from the cache. * * @param Page $page Optional Page that initiated the uncacheAll * */ public function uncacheAll(Page $page = null) { $this->pageFinder = null; unset($this->sortfields); $this->sortfields = new PagesSortfields(); if ($this->config->debug) { $this->debugLog('uncacheAll', 'pageIdCache=' . count($this->pageIdCache) . ', pageSelectorCache=' . count($this->pageSelectorCache)); } foreach ($this->pageIdCache as $id => $page) { if (!$page->numChildren) { $this->uncache($page); } } $this->pageIdCache = array(); $this->pageSelectorCache = array(); Page::$loadingStack = array(); Page::$instanceIDs = array(); }