mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
11 lines
383 B
TypeScript
11 lines
383 B
TypeScript
import { MastodonTranslation } from '@ditto/mastoapi/types';
|
|
import { LanguageCode } from 'iso-639-1';
|
|
import { LRUCache } from 'lru-cache';
|
|
|
|
import { Conf } from '@/config.ts';
|
|
|
|
/** Translations LRU cache. */
|
|
export const translationCache = new LRUCache<`${LanguageCode}-${string}`, MastodonTranslation>({
|
|
max: Conf.caches.translation.max,
|
|
ttl: Conf.caches.translation.ttl,
|
|
});
|