Skip to content

Commit 436dc6d

Browse files
committed
disabled cahing on intelligent resource selection
1 parent a616ed4 commit 436dc6d

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

libs/remix-ai-core/src/inferencers/mcp/mcpInferencer.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -561,19 +561,10 @@ export class MCPInferencer extends RemoteInferencer implements ICompletions, IGe
561561
try {
562562
// Try to get from cache first
563563
let content = null //this.resourceCache.get(resource.uri);
564-
if (!content) {
565-
const client = this.mcpClients.get(serverName);
566-
if (client) {
567-
content = await client.readResource(resource.uri);
568-
console.log('read resource', resource.uri, content)
569-
// Cache with TTL
570-
this.resourceCache.set(resource.uri, content);
571-
setTimeout(() => {
572-
this.resourceCache.delete(resource.uri);
573-
}, this.cacheTimeout);
574-
}
575-
} else {
576-
console.log('using cached resource content for ', resource.uri, content)
564+
const client = this.mcpClients.get(serverName);
565+
if (client) {
566+
content = await client.readResource(resource.uri);
567+
console.log('read resource', resource.uri, content)
577568
}
578569

579570
if (content?.text) {

0 commit comments

Comments
 (0)