private function getSuitableIds(
        FixtureMatchReferenceValue $value,
        ResolvedFixtureSet $fixtureSet,
        GenerationContext $context
    ): array {
        $pattern = $value->getValue();

        try {
            $cache = $context->getCachedValue(self::IDS_BY_PATTERN_CACHE_KEY);
        } catch (CachedValueNotFound $exception) {
            $cache = [];
        }

        if (array_key_exists($pattern, $cache)) {
            return $cache[$pattern];
        }

        $suitableIds = $this->findSuitableIds($pattern, $fixtureSet);

        $cache[$pattern] = $suitableIds;
        $context->cacheValue(self::IDS_BY_PATTERN_CACHE_KEY, $cache);

        return $suitableIds;
    }