PagesLoaderCache class

Located in file /wire/core/PagesLoaderCache.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the PagesLoaderCache class also inherits all the methods and properties of: Wire.

Show class?             Show args?        

Common

NameReturnSummary 
PagesLoaderCache::cache(Page $page)
(nothing)Cache the given page. 
PagesLoaderCache::cacheGroup(Page $page, string $groupName)
(nothing)Cache given page into a named group that it can be uncached with 
PagesLoaderCache::getCache()
Page array nullGiven a Page ID, return it if it's cached, or NULL of it's not. 
PagesLoaderCache::getCacheStatus()
array stringGet cache status 
PagesLoaderCache::getSelectorCache(string $selector, array $options)
array null string PageArrayRetrieve any cached page IDs for the given selector and options OR false if none found. 
PagesLoaderCache::selectorCache(string $selector, array $options, PageArray $pages)
boolCache the given selector string and options with the given PageArray 
PagesLoaderCache::uncache($page)
boolRemove the given page from the cache. 
PagesLoaderCache::uncacheAll()
intRemove all pages from the cache 
PagesLoaderCache::uncacheGroup(string $groupName)
intUncache pages that were cached with given group name 

Additional methods and properties

In addition to the methods and properties above, PagesLoaderCache also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.200

Twitter updates

  • A review of weekly core updates, plus a simple recipe for a very effective listing cache—More
    24 June 2022
  • Weekly update: Making ProcessWire render pages at old WordPress URLs (or building a simple/custom URL router in PW): More
    17 June 2022
  • New post: ProcessWire now comes with just 1 site installation profile, the "blank" profile. It makes very few assumptions, making it a minimal though excellent starting point. Here’s how you might use it— More
    10 June 2022

Latest news

  • ProcessWire Weekly #424
    In the 424th issue of ProcessWire Weekly we'll check out the latest weekly update from Ryan, introduce a new third party module, and more. Read on!
    Weekly.pw / 25 June 2022
  • Starting a site with the “blank” profile
    ProcessWire 3.0.200+ comes with just 1 site installation profile, the site-blank profile. This profile makes very few assumptions, making it a minimal though excellent starting point. Here’s how you might use it. 
    Blog / 10 June 2022
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani