import type { TranslationResult } from '../types.js'; /** * 读取缓存。命中且未过期返回结果,否则返回 undefined。 * 任何 I/O / 解析错误都视为未命中(缓存永不阻断正常查询)。 */ export declare function getCached(pluginName: string, word: string, ttlMs: number): Promise; /** * 写入缓存。只缓存成功结果(带 error 的结果不缓存)。 * 写入失败静默忽略(缓存是尽力而为的优化,不应影响主流程)。 */ export declare function setCached(pluginName: string, word: string, result: TranslationResult): Promise; /** 清空整个缓存目录。 */ export declare function clearCache(): Promise;