Jump to content

schafdog27

Members
  • Posts

    9
  • Joined

  • Last visited

Community Answers

  1. schafdog27's post in Clear template cache on sort? was marked as the answer   
    Thanks, that got me on the right track. I was able to clear the cache by hooking after ProcessPageSort::execute.
    public function init() { $this->addHookAfter('ProcessPageSort::execute', $this, 'afterSort'); } public function afterSort() { $homePage = wire("pages")->get("template=home"); $pageRender = wire("modules")->get("PageRender"); $cacheFile = $pageRender->getCacheFile($homePage); $cacheFile->expireAll(); }
×
×
  • Create New...