private function cache($offset, $limit)
    {
        $items = $this->adapter->getItems($offset, $limit);
        $i = $offset;

        foreach ($items as $item) {
            $this->cached[$i++] = $item;
        }

        if (count($items) < $limit) {
            $this->lastItemPos = $i - 1;
        }
    }