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 };