Pages Loader Cache
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.
Get
Name | Return | Summary | |
---|---|---|---|
$pages->cacher->getCache() $pages->cacher->getCache() $pages->cacher->getCache($id = null) | Page array null | Given a Page ID, return it if it's cached, or NULL of it's not. | |
$pages->cacher->getCacheStatus() $pages->cacher->getCacheStatus() $pages->cacher->getCacheStatus($verbose = null) | array string | Get cache status | |
$pages->cacher->getSelectorCache() $pages->cacher->getSelectorCache(string $selector, array $options) $pages->cacher->getSelectorCache(string $selector, array $options, bool $returnSelector = false) | array null string PageArray | Retrieve any cached page IDs for the given selector and options OR false if none found. | |
$pages->cacher->hasCache() $pages->cacher->hasCache($id) $pages->cacher->hasCache($id) | bool | Is given page ID in the cache? |
Save
Name | Return | Summary | |
---|---|---|---|
$pages->cacher->cache() $pages->cacher->cache(Page $page) $pages->cacher->cache(Page $page) | None | Cache the given page in memory | |
$pages->cacher->cacheGroup() $pages->cacher->cacheGroup(Page $page, string $groupName) $pages->cacher->cacheGroup(Page $page, string $groupName) | None | Cache given page into a named group that it can be uncached with | |
$pages->cacher->selectorCache() $pages->cacher->selectorCache(string $selector, array $options, PageArray $pages) $pages->cacher->selectorCache(string $selector, array $options, PageArray $pages) | bool | Cache the given selector string and options with the given PageArray |
Remove
Name | Return | Summary | |
---|---|---|---|
$pages->cacher->uncache() $pages->cacher->uncache($page) $pages->cacher->uncache($page, array $options = []) | bool | Remove the given page from the cache. | |
$pages->cacher->uncacheAll() $pages->cacher->uncacheAll() $pages->cacher->uncacheAll($page = null, array $options = []) | int | Remove all pages from the cache | |
$pages->cacher->uncacheGroup() $pages->cacher->uncacheGroup(string $groupName) $pages->cacher->uncacheGroup(string $groupName, array $options = []) | int | Uncache 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.252