protected function getFilterArray($onlyActive)
    {
        $cacheKey = ($onlyActive) ? 'public' : 'admin';
        if ($this->cache->tags(['blocks'])->has('blocks:filter:' . $cacheKey)) {
            return $this->cache->tags(['blocks'])->get('blocks:filter:' . $cacheKey);
        } else {
            $blocks = $this->blockRepository->getBlocksWithFilter($onlyActive);
            $filter = $this->buildFilterArray($blocks);
            $this->cache->tags(['blocks'])->forever('blocks:filter:' . $cacheKey, $filter);
            return $filter;
        }
    }