Browse files

No commit message

  • Loading branch information...
1 parent ac49a71 commit 20ad7b1cd235588c2800ce963bbefa20051eb806 qiang.xue committed Aug 9, 2009
Showing with 19 additions and 0 deletions.
  1. +19 −0 framework/caching/CDummyCache.php
View
19 framework/caching/CDummyCache.php
@@ -31,6 +31,25 @@ public function get($id)
}
/**
+ * Retrieves multiple values from cache with the specified keys.
+ * Some caches (such as memcache, apc) allow retrieving multiple cached values at one time,
+ * which may improve the performance since it reduces the communication cost.
+ * In case a cache doesn't support this feature natively, it will be simulated by this method.
+ * @param array list of keys identifying the cached values
+ * @return array list of cached values corresponding to the specified keys. The array
+ * is returned in terms of (key,value) pairs.
+ * If a value is not cached or expired, the corresponding array value will be false.
+ * @since 1.0.8
+ */
+ public function mget($ids)
+ {
+ $results=array();
+ foreach($ids as $id)
+ $results[$id]=false;
+ return $results;
+ }
+
+ /**
* Stores a value identified by a key into cache.
* If the cache already contains such a key, the existing value and
* expiration time will be replaced with the new ones.

0 comments on commit 20ad7b1

Please sign in to comment.