r68492 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68491‎ | r68492 | r68493 >
Date:23:30, 23 June 2010
Author:tparscal
Status:deferred (Comments)
Tags:
Comment:
Memcache results are null if it's disabled. Maybe we could check if it's enabled?
Modified paths:
  • /branches/resourceloader/phase3/includes/ResourceLoader.php (modified) (history)

Diff [purge]

Index: branches/resourceloader/phase3/includes/ResourceLoader.php
@@ -192,7 +192,7 @@
193193 global $wgMemc;
194194 $key = wfMemcKey( 'resourceloader', 'jsmin', md5( $js ) );
195195 $cached = $wgMemc->get( $key );
196 - if ( $cached !== false ) {
 196+ if ( $cached !== false && $cached !== null ) {
197197 return $cached;
198198 }
199199 $retval = JSMin::minify( $js );

Comments

#Comment by Catrope (talk | contribs)   10:07, 24 June 2010

Blegh, it seems the real memcached client returns false on a cache miss, but FakeMemCachedClient returns null. Since we're grabbing strings that are supposed to be non-empty and non-numeric, let's just use !$cached.

#Comment by Nikerabbit (talk | contribs)   10:29, 24 June 2010

Can't we just fix FakeMem?

Status & tagging log