Function Hook_task_cns_topics_recache->run
Definitions
sources/hooks/systems/tasks/cns_topics_recache.php
- Run the task hook.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $topic_scope | ?AUTO_LINK | No | No | Null | N/A | N/A | The topic ID which all de-cacheing should take place (null: all topics) |
| $recache_topics | boolean | No | No | True | N/A | N/A | Whether to re-cache topics |
| $recache_poll_votes | boolean | No | No | True | N/A | N/A | Whether to re-cache poll votes |
| $nullify_poll_voting_power | boolean | No | No | False | N/A | N/A | Whether to nullify the voting_power cache (recalculated individually when polls are viewed) |
Returns
- A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
- Type: ?array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Run the task hook.
*
* @param ?AUTO_LINK $topic_scope The topic ID which all de-cacheing should take place (null: all topics)
* @param boolean $recache_topics Whether to re-cache topics
* @param boolean $recache_poll_votes Whether to re-cache poll votes
* @param boolean $nullify_poll_voting_power Whether to nullify the voting_power cache (recalculated individually when polls are viewed)
* @return ?array A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
*/
public function run(?int $topic_scope = null, bool $recache_topics = true, bool $recache_poll_votes = true, bool $nullify_poll_voting_power = false) : ?array
* Run the task hook.
*
* @param ?AUTO_LINK $topic_scope The topic ID which all de-cacheing should take place (null: all topics)
* @param boolean $recache_topics Whether to re-cache topics
* @param boolean $recache_poll_votes Whether to re-cache poll votes
* @param boolean $nullify_poll_voting_power Whether to nullify the voting_power cache (recalculated individually when polls are viewed)
* @return ?array A tuple of at least 2: Return mime-type, content (either Tempcode, or a string, or a filename and file-path pair to a temporary file), map of HTTP headers if transferring immediately, map of ini_set commands if transferring immediately (null: show standard success message)
*/
public function run(?int $topic_scope = null, bool $recache_topics = true, bool $recache_poll_votes = true, bool $nullify_poll_voting_power = false) : ?array

