Manga title to cache results for
Ranked manga results to cache
Search configuration
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();
}
Store ranked manga results to cache for future searches.
Skips caching if bypassCache is enabled in config.