@@ -205,19 +205,11 @@ private function getRedisConfiguration($options)
205205
206206 /**
207207 * @param string $key
208- * @return \SplitIO\Component\Cache\Item
208+ * @return string
209209 */
210210 public function getItem ($ key )
211211 {
212- $ item = new Item ($ key );
213-
214- $ redisItem = $ this ->client ->get ($ key );
215-
216- if ($ redisItem !== null ) {
217- $ item ->set ($ redisItem );
218- }
219-
220- return $ item ;
212+ return $ this ->client ->get ($ key );
221213 }
222214
223215
@@ -231,11 +223,7 @@ public function getItem($key)
231223 * If any of the keys in $keys are not a legal value a \Psr\Cache\InvalidArgumentException
232224 * MUST be thrown.
233225 *
234- * @return array|\Traversable
235- * A traversable collection of Cache Items keyed by the cache keys of
236- * each item. A Cache item will be returned for each key, even if that
237- * key is not found. However, if no keys are specified then an empty
238- * traversable MUST be returned instead.
226+ * @return array
239227 */
240228 public function getItems (array $ keys = array ())
241229 {
@@ -245,10 +233,7 @@ public function getItems(array $keys = array())
245233 }
246234 $ values = $ this ->client ->mget ($ keys );
247235 foreach ($ keys as $ index => $ key ) {
248- $ toReturn [$ key ] = new Item ($ key );
249- if (!is_null ($ values [$ index ])) {
250- $ toReturn [$ key ]->set ($ values [$ index ]);
251- }
236+ $ toReturn [$ key ] = $ values [$ index ];
252237 }
253238 return $ toReturn ;
254239 }
0 commit comments