Function __global->cns_force_update_forum_caching

Definitions

sources/cns_posts_action2.php

  • Update a forums cached details.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$forum_id AUTO_LINK No No required parameter N/A N/A The ID of the forum to update the cached details of
$num_topics_increment ?integer No No Null N/A N/A How much to increment the topic count by (null: It has to be completely recalculated)
$num_posts_increment ?integer No No Null N/A N/A How much to increment the post count by (null: It has to be completely recalculated)
$last_topic_id ?AUTO_LINK No No Null N/A N/A The ID of the last topic (null: Unknown, it will have to be looked up)
$last_title ?string No No Null N/A N/A The title of the last topic (null: Unknown, it will have to be looked up)
$last_time ?TIME No No Null N/A N/A The last post time of the last topic (null: Unknown, it will have to be looked up)
$last_username ?string No No Null N/A N/A The last post username of the last topic (null: Unknown, it will have to be looked up)
$last_member_id ?MEMBER No No Null N/A N/A The last post member of the last topic (null: Unknown, it will have to be looked up)
$last_forum_id ?AUTO_LINK No No Null N/A N/A The forum the last post was in (note this makes sense, because there may be subforums under this forum that we have to take into account). (null: Unknown, it will have to be looked up).

Preview

Code (PHP)

/**
 * Update a forums cached details.
 *
 * @param  AUTO_LINK $forum_id The ID of the forum to update the cached details of
 * @param  ?integer $num_topics_increment How much to increment the topic count by (null: It has to be completely recalculated)
 * @param  ?integer $num_posts_increment How much to increment the post count by (null: It has to be completely recalculated)
 * @param  ?AUTO_LINK $last_topic_id The ID of the last topic (null: Unknown, it will have to be looked up)
 * @param  ?string $last_title The title of the last topic (null: Unknown, it will have to be looked up)
 * @param  ?TIME $last_time The last post time of the last topic (null: Unknown, it will have to be looked up)
 * @param  ?string $last_username The last post username of the last topic (null: Unknown, it will have to be looked up)
 * @param  ?MEMBER $last_member_id The last post member of the last topic (null: Unknown, it will have to be looked up)
 * @param  ?AUTO_LINK $last_forum_id The forum the last post was in (note this makes sense, because there may be subforums under this forum that we have to take into account). (null: Unknown, it will have to be looked up).
 */

function cns_force_update_forum_caching(int $forum_id, ?int $num_topics_increment = null, ?int $num_posts_increment = null, ?int $last_topic_id = null, ?string $last_title = null, ?int $last_time = null, ?string $last_username = null, ?int $last_member_id = null, ?int $last_forum_id = null)