Function __global->calculate_category_child_count_cache
Definitions
sources/catalogues2.php
- Update cache for a categories child counts.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $cat_id | ?AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the category (null: skip, called by some code that didn't realise it didn't impact a tree parent) |
| $recursive_updates | boolean | No | No | True | N/A | N/A | Whether to recurse up the tree to force recalculations on other categories (recommended, unless you are doing a complete rebuild) |
Preview
Code (PHP)
/**
* Update cache for a categories child counts.
*
* @param ?AUTO_LINK $cat_id The ID of the category (null: skip, called by some code that didn't realise it didn't impact a tree parent)
* @param boolean $recursive_updates Whether to recurse up the tree to force recalculations on other categories (recommended, unless you are doing a complete rebuild)
*/
function calculate_category_child_count_cache(?int $cat_id, bool $recursive_updates = true)
* Update cache for a categories child counts.
*
* @param ?AUTO_LINK $cat_id The ID of the category (null: skip, called by some code that didn't realise it didn't impact a tree parent)
* @param boolean $recursive_updates Whether to recurse up the tree to force recalculations on other categories (recommended, unless you are doing a complete rebuild)
*/
function calculate_category_child_count_cache(?int $cat_id, bool $recursive_updates = true)

