MCPcopy
hub / github.com/darkreader/darkreader / writeImageDetailsCache

Function writeImageDetailsCache

src/inject/cache.ts:48–55  ·  view source on GitHub ↗
(url: string, imageDetails: ImageDetails)

Source from the content-addressed store, hash-verified

46}
47
48export function writeImageDetailsCache(url: string, imageDetails: ImageDetails): void {
49 if (!url || !url.startsWith('https://')) {
50 return;
51 }
52 imageDetailsCacheQueue.set(url, imageDetails);
53 clearTimeout(imageCacheTimeout);
54 imageCacheTimeout = setTimeout(writeImageDetailsQueue, 1000);
55}
56
57export function readImageDetailsCache(targetMap: Map<string, ImageDetails>): void {
58 try {

Callers 1

getURLModifierFunction · 0.90

Calls 1

setMethod · 0.65

Tested by

no test coverage detected