$procache→getCacheClearBehaviors()
Get the cache clearing behaviors for all templates or a given template
If given no arguments, returns array in this format:
If given a template, then just the single dimensional array is returned containing only the behaviors.
Example
$returnValue = [
'template-name' => [
// one or more of these:
CACHE_CLEAR_[BEHAVIOR] => CACHE_CLEAR_[BEHAVIOR],
CACHE_CLEAR_PAGES => [ 123, 456, 789 ],
CACHE_CLEAR_SELECTOR => "selector string",
],
'template-name' => [
// behaviors
],
];
Usage
// basic usage
$array = $procache->getCacheClearBehaviors();
// usage with all arguments
$array = $procache->getCacheClearBehaviors($options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
$options (optional) | null Template string int array | Specify any of the following options:
|
Return value
array
$procache methods and properties
API reference based on ProcessWire core version 3.0.252