$procache->cacheOn() method

Get or set cache on/off status

For public API use this to set cache status (rather than the $cacheOn property) because this will commit the state to the module config as well.


// basic usage
$bool = $procache->cacheOn();

// usage with all arguments
$bool = $procache->cacheOn($set = null);


set (optional)bool, null

Specify true to enable, false to disable, or omit to get cache status

Return value


$procache methods and properties

API reference based on ProcessWire core version 3.0.200

Twitter updates

  • Introduction to an invoice application profile being built in ProcessWire: More
    30 September 2022
  • Stumbling upon a really nice ProcessWire-powered website, plus core updates including API improvements for ProcessWire forms— More
    9 September 2022
  • Useful new dot-and-bracket syntax options added for page.get() method— More
    2 September 2022

Latest news

  • ProcessWire Weekly #437
    In the 437th issue of ProcessWire Weekly we're going to check out the latest core updates, forum highlights and online resources, and more. Read on!
    Weekly.pw / 24 September 2022
  • Multi-language field translation export/import
    In this post we cover the details of a new module that enables export and import capabilities for multi-language fields in ProcessWire.
    Blog / 5 August 2022
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer