private function getFilter($uid)
    {
        if (isset($this->filters[$uid])) {
            return $this->filters[$uid];
        }

        $entry = $this->cache->get($this->getCacheId($uid));

        if ($entry && $entry->data instanceof BloomFilter) {
            return $this->filters[$uid] = $entry->data;
        }

        return $this->filters[$uid] = $this->rebuildFilter($uid);
    }