Jack Phoenix has submitted this change and it was merged.
Change subject: Cache not clearing
......................................................................
Cache not clearing
I'm getting some errors with the cache not clearing on comment add,
this will help to solve the problem
Change-Id: I0f2bc9c37fc15507814a30d7bb8a7c41a90bf335
---
M CommentsPage.php
1 file changed, 6 insertions(+), 5 deletions(-)
Approvals:
Jack Phoenix: Verified; Looks good to me, approved
diff --git a/CommentsPage.php b/CommentsPage.php
index ced4193..174dabf 100644
--- a/CommentsPage.php
+++ b/CommentsPage.php
@@ -570,12 +570,13 @@
*/
function clearCommentListCache() {
global $wgMemc;
- $wgMemc->delete( wfMemcKey( 'comment', 'pagelist', $this->id ) );
+ wfDebug( "Clearing comments for page {$this->id} from cache\n" );
+ $key = wfMemcKey( 'comment', 'pagelist', $this->id );
+ $wgMemc->delete( $key );
- $pageTitle = Title::newFromID( $this->id );
- if ( is_object( $pageTitle ) ) {
- $pageTitle->invalidateCache();
- $pageTitle->purgeSquid();
+ if ( is_object( $this->title ) ) {
+ $this->title->invalidateCache();
+ $this->title->purgeSquid();
}
}
--
To view, visit https://gerrit.wikimedia.org/r/191135
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0f2bc9c37fc15507814a30d7bb8a7c41a90bf335
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Comments
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT <[email protected]>
Gerrit-Reviewer: Jack Phoenix <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits