PagesLoaderCache class

Implements page caching of loaded pages and PageArrays for $pages API variable

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?       Only hookable?    

Common

NameReturnSummary 
PagesLoaderCache::cache(Page $page)
NoneCache the given page. 
PagesLoaderCache::cacheGroup(Page $page, string $groupName)
NoneCache 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::hasCache($id)
boolIs given page ID in the cache? 
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.251