Skip to content

Commit

Permalink
feat: default open module cache
Browse files Browse the repository at this point in the history
  • Loading branch information
skyoct committed Oct 25, 2023
1 parent 366a6a4 commit 86c11a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion runtimes/nodejs/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ export default class Config {
}

static get ENABLE_MODULE_CACHE(): boolean {
return process.env.ENABLE_MODULE_CACHE === 'true' || false
return process.env.ENABLE_MODULE_CACHE === 'true' || true
}
}
1 change: 1 addition & 0 deletions runtimes/nodejs/src/support/engine/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class FunctionModule {

// check cache
if (FunctionModule.cache.has(name)) {
console.log(`load module from cache: ${name}`)
return FunctionModule.cache.get(name)
}

Expand Down

0 comments on commit 86c11a1

Please sign in to comment.