public function getFirstXValuesFromList($key, $numValues) { if ($numValues <= 0) { return array(); } $this->connectIfNeeded(); $values = $this->redis->lRange($key, 0, $numValues - 1); return $values; }