Function __global->cns_force_update_topic_caching
Definitions
sources/cns_posts_action2.php
- Update a topic's caching.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $topic_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the topic to update caching of |
| $post_count_dif | ?integer | No | No | Null | N/A | N/A | The post count difference we know the topic has undergone (null: we'll need to work out from scratch how many posts are in the topic) |
| $last | boolean | No | No | True | N/A | N/A | Whether this is the latest post in the topic |
| $first | boolean | No | No | False | N/A | N/A | Whether this is the first post in the topic |
| $last_post_id | ?AUTO_LINK | No | No | Null | N/A | N/A | The ID of the last post in the topic (null: unknown) |
| $last_time | ?TIME | No | No | Null | N/A | N/A | The time of the last post in the topic (null: unknown) |
| $last_title | ?string | No | No | Null | N/A | N/A | The title of the last post in the topic (null: unknown) |
| $last_post | ?mixed | No | No | Null | N/A | N/A | The ID of the last post's content language string for the topic (null: unknown) |
| $last_username | ?string | No | No | Null | N/A | N/A | The last username to post in the topic (null: unknown) |
| $last_member_id | ?MEMBER | No | No | Null | N/A | N/A | The ID of the last member to post in the topic (null: unknown) |
Preview
Code (PHP)
/**
* Update a topic's caching.
*
* @param AUTO_LINK $topic_id The ID of the topic to update caching of
* @param ?integer $post_count_dif The post count difference we know the topic has undergone (null: we'll need to work out from scratch how many posts are in the topic)
* @param boolean $last Whether this is the latest post in the topic
* @param boolean $first Whether this is the first post in the topic
* @param ?AUTO_LINK $last_post_id The ID of the last post in the topic (null: unknown)
* @param ?TIME $last_time The time of the last post in the topic (null: unknown)
* @param ?string $last_title The title of the last post in the topic (null: unknown)
* @param ?mixed $last_post The ID of the last post's content language string for the topic (null: unknown)
* @param ?string $last_username The last username to post in the topic (null: unknown)
* @param ?MEMBER $last_member_id The ID of the last member to post in the topic (null: unknown)
*/
function cns_force_update_topic_caching(int $topic_id, ?int $post_count_dif = null, bool $last = true, bool $first = false, ?int $last_post_id = null, ?int $last_time = null, ?string $last_title = null, $last_post = null, ?string $last_username = null, ?int $last_member_id = null)
* Update a topic's caching.
*
* @param AUTO_LINK $topic_id The ID of the topic to update caching of
* @param ?integer $post_count_dif The post count difference we know the topic has undergone (null: we'll need to work out from scratch how many posts are in the topic)
* @param boolean $last Whether this is the latest post in the topic
* @param boolean $first Whether this is the first post in the topic
* @param ?AUTO_LINK $last_post_id The ID of the last post in the topic (null: unknown)
* @param ?TIME $last_time The time of the last post in the topic (null: unknown)
* @param ?string $last_title The title of the last post in the topic (null: unknown)
* @param ?mixed $last_post The ID of the last post's content language string for the topic (null: unknown)
* @param ?string $last_username The last username to post in the topic (null: unknown)
* @param ?MEMBER $last_member_id The ID of the last member to post in the topic (null: unknown)
*/
function cns_force_update_topic_caching(int $topic_id, ?int $post_count_dif = null, bool $last = true, bool $first = false, ?int $last_post_id = null, ?int $last_time = null, ?string $last_title = null, $last_post = null, ?string $last_username = null, ?int $last_member_id = null)

