Function __global->erase_cached_templates
Definitions
sources/caches3.php
- Erase all template caches (caches in all themes).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $preserve_some | boolean | No | No | False | N/A | N/A | Whether to preserve CSS and JS files that might be linked to between requests |
| $only_templates | ?array | No | No | Null | N/A | N/A | Only erase specific templates with the following filename, excluding suffix(es) (null: erase all) |
| $raw_file_regexp | ?string | No | No | Null | N/A | N/A | The original template must contain a match for this regular expression (null: no restriction) |
| $rebuild_some_deleted_files | boolean | No | No | False | N/A | N/A | Whether to rebuild some files that are deleted (be very careful about this, it is high-intensity, and may break due to in-memory caches still existing) |
Preview
Code (PHP)
/**
* Erase all template caches (caches in all themes).
*
* @param boolean $preserve_some Whether to preserve CSS and JS files that might be linked to between requests
* @param ?array $only_templates Only erase specific templates with the following filename, excluding suffix(es) (null: erase all)
* @param ?string $raw_file_regexp The original template must contain a match for this regular expression (null: no restriction)
* @param boolean $rebuild_some_deleted_files Whether to rebuild some files that are deleted (be very careful about this, it is high-intensity, and may break due to in-memory caches still existing)
*/
function erase_cached_templates(bool $preserve_some = false, ?array $only_templates = null, ?string $raw_file_regexp = null, bool $rebuild_some_deleted_files = false)
* Erase all template caches (caches in all themes).
*
* @param boolean $preserve_some Whether to preserve CSS and JS files that might be linked to between requests
* @param ?array $only_templates Only erase specific templates with the following filename, excluding suffix(es) (null: erase all)
* @param ?string $raw_file_regexp The original template must contain a match for this regular expression (null: no restriction)
* @param boolean $rebuild_some_deleted_files Whether to rebuild some files that are deleted (be very careful about this, it is high-intensity, and may break due to in-memory caches still existing)
*/
function erase_cached_templates(bool $preserve_some = false, ?array $only_templates = null, ?string $raw_file_regexp = null, bool $rebuild_some_deleted_files = false)

