r103705 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103704‎ | r103705 | r103706 >
Date:20:01, 19 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Bug 13759 - memcached predefined hashes

Patch by Zac Bristow

Half of the patch was already applied. Updated documentation to match
Modified paths:
  • /trunk/phase3/includes/objectcache/MemcachedClient.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/objectcache/MemcachedClient.php
@@ -396,7 +396,7 @@
397397 /**
398398 * Retrieves the value associated with the key from the memcache server
399399 *
400 - * @param $key Mixed: key to retrieve
 400+ * @param $key array|string key to retrieve
401401 *
402402 * @return Mixed
403403 */
@@ -419,6 +419,7 @@
420420 return false;
421421 }
422422
 423+ $key = is_array( $key ) ? $key[1] : $key;
423424 if ( isset( $this->stats['get'] ) ) {
424425 $this->stats['get']++;
425426 } else {
@@ -826,9 +827,9 @@
827828 /**
828829 * Perform increment/decriment on $key
829830 *
830 - * @param $cmd String: command to perform
831 - * @param $key String: key to perform it on
832 - * @param $amt Integer: amount to adjust
 831+ * @param $cmd String command to perform
 832+ * @param $key String|array key to perform it on
 833+ * @param $amt Integer amount to adjust
833834 *
834835 * @return Integer: new value of $key
835836 * @access private
@@ -958,7 +959,7 @@
959960 } else {
960961 $this->stats[$cmd] = 1;
961962 }
962 -
 963+
963964 // TTLs higher than 30 days will be detected as absolute TTLs
964965 // (UNIX timestamps), and will result in the cache entry being
965966 // discarded immediately because the expiry is in the past.

Follow-up revisions

RevisionCommit summaryAuthorDate
r103710RELEASE-NOTES-1.19 for r103706, r103708...reedy21:17, 19 November 2011

Status & tagging log