public function deleteByUri(string $uri) {
        if (!isset($this->cache[$uri])) {
            throw new NotInCache();
        }
        foreach ($this->uri2id[$uri] as $id) {
            unset($this->id2uri[$id]);
        }
        unset($this->uri2id[$uri]);
        unset($this->cache[$uri]);
    }