• Store ranked manga results to cache for future searches.

    Skips caching if bypassCache is enabled in config.

    Parameters

    Returns void

    export function cacheSearchResults(
    title: string,
    results: AniListManga[],
    searchConfig: SearchServiceConfig,
    ): void {
    if (searchConfig.bypassCache) {
    console.debug(
    `[MangaSearchService] 🔍 MANUAL SEARCH: Skipping cache save for "${title}"`,
    );
    return;
    }

    const cacheKey = generateCacheKey(title);
    const sanitizedResults = filterOutBlacklistedManga(results);
    mangaCache[cacheKey] = {
    manga: sanitizedResults,
    timestamp: Date.now(),
    sourceMetadata: undefined,
    };
    saveCache();
    }