MCPcopy Create free account
hub / github.com/Bistutu/FluentRead / setTransCache

Function setTransCache

userscripts.js:265–271  ·  view source on GitHub ↗
(origin, result)

Source from the content-addressed store, hash-verified

263const localStorageManager = {
264 // 同时缓存原文和译文
265 setTransCache(origin, result) {
266 let model = util.getValue('model');
267 let option = optionsManager.getOption(model);
268 // key: 模型_文本,value: 文本
269 localStorage.setItem(model + "_" + option + "_" + origin, result)
270 localStorage.setItem(model + "_" + option + "_" + result, origin)
271 },
272 getTransCache(key) {
273 let model = util.getValue('model');
274 let option = optionsManager.getOption(model);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected