dockjss / web-content /utils /cache.js
franyer24's picture
Upload 1895 files
2e178e3 verified
Raw
History Blame Contribute Delete
448 Bytes
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 };