ProCacheStatic class

Located in file /site/modules/ProCache/ProCacheStatic.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 ProCacheStatic class also inherits all the methods and properties of: ProCacheClass and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
ProCacheStatic::addTestData(string $action)
(nothing)Add 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()
intCache 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::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()
(nothing)Install 
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, string $out)
boolSave a new static cache file 
ProCacheStatic::setTestMode(bool $testMode)
(nothing)Enable or disable test mode 
ProCacheStatic::uninstall()
(nothing)Uninstall 

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.236

Latest news

  • ProcessWire Weekly #515
    In the 515th issue of ProcessWire Weekly we’ll check out the latest core updates, new modules, and more. Read on!
    Weekly.pw / 23 March 2024
  • Invoices Site Profile
    The new invoices site profile is a free invoicing application developed in ProcessWire. It enables you to create invoices, record payments to them, email invoices to clients, print invoices, and more. This post covers all the details.
    Blog / 15 March 2024
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer