1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-25 07:25:04 +02:00

fix(backend): summalyの結果のキャッシュが後続処理によって書き換わる問題を修正

Follow-up of #17367
This commit is contained in:
かっこかり
2026-07-12 16:54:57 +09:00
committed by GitHub
parent 6ceda0f004
commit aab7903ab0

View File

@@ -9,6 +9,7 @@ import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { HttpRequestService } from '@/core/HttpRequestService.js';
import type Logger from '@/logger.js';
import { deepClone } from '@/misc/clone.js';
import { query } from '@/misc/prelude/url.js';
import { MemoryKVCache } from '@/misc/cache.js';
import { LoggerService } from '@/core/LoggerService.js';
@@ -101,7 +102,7 @@ export class UrlPreviewService implements OnApplicationShutdown {
return result;
};
const summary = await this.summaryCache.fetchMaybe(`${url}@${lang ?? '_DEFAULT_'}`, fetcher);
const summary = deepClone(await this.summaryCache.fetchMaybe(`${url}@${lang ?? '_DEFAULT_'}`, fetcher));
if (summary == null) {
throw new Error('Invalid summary');