public function set($key, $value): bool
    {
        $added = true;
        $bucket = $this->locate($key);

        if ($bucket !== null) {
            $this->removeBucket($bucket);
            $this->rewind();
            $added = false;
        }

        $this->insertBetween($key, $value, $this->head, $this->head->next());
        $this->offset = 0;

        return $added;
    }