Emoji: Cache data by path instead of just Etag (#37858)

This commit is contained in:
Echo authored and GitHub committed 2026-02-13 15:23:22 +00:00
1 parent c1a5bd52f2
commit 3d0a6ba831
7 files changed
+85 -114

No files matched your search

@@ -7,7 +7,7 @@ export async function importCustomEmoji(emojis: ApiCustomEmojiJSON[]) {
}
// First, check if we already have them all.
const { searchCustomEmojisByShortcodes, clearEtag } =
const { searchCustomEmojisByShortcodes, clearCache } =
await import('@/mastodon/features/emoji/database');
const existingEmojis = await searchCustomEmojisByShortcodes(
@@ -16,7 +16,7 @@ export async function importCustomEmoji(emojis: ApiCustomEmojiJSON[]) {
// If there's a mismatch, re-import all custom emojis.
if (existingEmojis.length < emojis.length) {
await clearEtag('custom');
await clearCache('custom');
await loadCustomEmoji();
}
}