ProCacheStatic class

Copyright (C) 2023 by Ryan Cramer

This is a commercially licensed and supported module DO NOT DISTRIBUTE


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

Show class?     Show args?       Only hookable?    

Common

NameReturnSummary 
ProCacheStatic::addTestData(string $action)
NoneAdd test mode data 
ProCacheStatic::cacheIndexBasename()
stringReturn the index filename relative to the given host and https state 
ProCacheStatic::cacheIndexBasenames()
arrayGet all possible index file basenames for cache files 
ProCacheStatic::cacheMaintenance()
int arrayCache maintenance to clear out cache files and DB entries have have expired 
ProCacheStatic::clearAll()
intClear entire cache 
ProCacheStatic::clearBranch(Page $page)
intClear entire Page branch (Page and everything below it) 
ProCacheStatic::clearPage(Page $page)
int arrayClear the cache for a specific page, including pageNum and urlSegment versions 
ProCacheStatic::clearPageNum(Page $page)
int arrayClear page pagination(s) 
ProCacheStatic::clearPageRoot(Page $page)
int arrayClear only root index file for given Page 
ProCacheStatic::clearPageUrlSegments(Page $page)
int arrayClear only URL segment(s) for page (optionally specifying which ones) 
ProCacheStatic::clearPages(PageArray $items)
int arrayClear the cache for multiple pages 
ProCacheStatic::clearPath(string $path)
int arrayClear by path or wildcard path, regardless of page 
ProCacheStatic::columnExists(string $column)
boolDoes given column exist? 
ProCacheStatic::executeCacheClearBehaviors(Page $page)
arrayExecute cache clear behaviors for given Page (to be called after Page has been modified and saved) 
ProCacheStatic::findCacheEntries()
ProCacheStaticEntryFind cache database rows of cache URLs for page matching given criteria 
ProCacheStatic::getBehaviorAbbrs()
arrayGet array of [ ProCache::CACHE_CLEAR_* => 'C' ] where 'C' is 1 char behavior abbreviation 
ProCacheStatic::getCacheClearBehaviors()
arrayGet the cache clearing behaviors for all templates or a given template 
ProCacheStatic::getCacheClearBehaviorsStr()
stringGet cache clear behaviors as string 
ProCacheStatic::getCacheFile(Page $page)
stringGet cache file for given Page and options 
ProCacheStatic::getCachePath()
stringReturn the path where we store cache files, optionally for a page
ProCacheStatic::getCachePathRoot()
stringGet root of path for storing cache files
ProCacheStatic::getCachePathSegments(array $segments, Page $page, array $options)
arrayHookable method that can adjust the segments array as needed
ProCacheStatic::getCacheTime()
array int stringGet the cache time for the given Template, or for all templates 
ProCacheStatic::getCacheTimesStr()
stringGet a string with all custom cache times 
ProCacheStatic::getContentTypeExt($item)
stringGet the content-type extension for the given Page or Template 
ProCacheStatic::getPageCachePathsLanguages(Page $page)
arrayGet cache paths for Page in all languages that it is published in 
ProCacheStatic::getTable()
stringGet primary ProCache DB table name while also checking that schema is up-to-date 
ProCacheStatic::getTestData()
arrayGet test mode data 
ProCacheStatic::getTestMode()
bool@return bool 
ProCacheStatic::hasCacheFile(Page $page)
bool stringGet cache file for given page and options if it exists, or false if it does not 
ProCacheStatic::install()
NoneInstall 
ProCacheStatic::newEntry()
ProCacheStaticEntryCreate and return a new ProCacheStaticEntry 
ProCacheStatic::numCachedPages()
intReturn the number of pages in the cache 
ProCacheStatic::pageInfo(Page $page)
array boolReturn an info array about the given page’s ProCache info or false if not cached 
ProCacheStatic::renderCache(Page $page, $out)
bool arraySave a new static cache file 
ProCacheStatic::setTestMode(bool $testMode)
NoneEnable or disable test mode 
ProCacheStatic::uninstall()
NoneUninstall 

For hooks

These methods are only useful for hooking and should not be called directly.

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.251