Jack Phoenix has submitted this change and it was merged.

Change subject: Reduce comment cache time
......................................................................


Reduce comment cache time

I (we) have found that having a 24 hour cache for NUMBEROFCOMMENTSPAGE can be
too much, as articles are most frequently commented on in the few hours
after their publishing, and so you can end up with very out of date
figures with a 24 hour cache. I've reduced it to 1 hour here, which should
have an almost insignificant effect in performance, while giving much more
up to date stats.

Change-Id: I9e8bfe1fda0f2c5acc5c2a94b5132af598aeb298
---
M NumberOfComments.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/NumberOfComments.php b/NumberOfComments.php
index 8f2a75b..e43f594 100644
--- a/NumberOfComments.php
+++ b/NumberOfComments.php
@@ -123,7 +123,7 @@
                        } else {
                                $val = intval( $res );
                        }
-                       $wgMemc->set( $key, $val, 60 * 60 * 24 ); // cache for 
24 hours
+                       $wgMemc->set( $key, $val, 60 * 60 ); // cache for an 
hour
                }
                return $val;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/104736
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e8bfe1fda0f2c5acc5c2a94b5132af598aeb298
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT <adamr_car...@btinternet.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: UltrasonicNXT <adamr_car...@btinternet.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to