File size: 448 Bytes
2e178e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
function cacheLink(id, link) {
    if (!id || typeof id !== 'string') {
        console.error('ID inválido:', id);
        return false;
    }

    //const result = `${global.hostname}/main/${id}`;

    if (!global.contentCache) {
        global.contentCache = {};
    }
    global.contentCache[id] = { result: link };
    console.log(`Enlace cacheado para ID ${id}:`, link);
    return true;
}



module.exports = { cacheLink };