r87429 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87428‎ | r87429 | r87430 >
Date:18:37, 4 May 2011
Author:awjrichards
Status:resolved (Comments)
Tags:
Comment:
Altering how we check for results in cache - now just checking if does not evaluate to false
Modified paths:
  • /trunk/extensions/ArticleFeedback/SpecialArticleFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/SpecialArticleFeedback.php
@@ -220,7 +220,7 @@
221221 // check if we've got results in the cache
222222 $key = wfMemcKey( 'article_feedback_stats_highs_lows' );
223223 $cache = $wgMemc->get( $key );
224 - if ( $cache != false && $cache != -1 ) {
 224+ if ( $cache ) {
225225 $result = $cache;
226226 } else {
227227 $dbr = wfGetDB( DB_SLAVE );

Follow-up revisions

RevisionCommit summaryAuthorDate
r87430Checking if cache object is instance of ResultsWrapper, per suggestion from T...awjrichards18:40, 4 May 2011

Comments

#Comment by Trevor Parscal (WMF) (talk | contribs)   18:44, 4 May 2011

I know I suggested this, but now we get errors when converting a ResultsWrapper to an integer... Bah!

Status & tagging log