protected function updateInverseIndex($key, $minutes = null)
    {
        $this->setKeywordsOperation(true);

        $keywordsState = $this->determineKeywordsState($key);

        $inverseIndexKey = $this->generateInverseIndexKey($key);

        if (empty($keywordsState['new'])) {
            parent::forget($inverseIndexKey);
        } elseif ($keywordsState['old'] != $keywordsState['new']) {
            $newInverseIndex = array_values($keywordsState['new']);
            is_null($minutes) ?
                parent::forever($inverseIndexKey, $newInverseIndex) :
                parent::put($inverseIndexKey, $newInverseIndex, $minutes);
        }

        $this->setKeywordsOperation(false);
    }