Feat(modules-sdk,inventory,stock-location): modules isolated connection (#3329)

* feat: scoped container for modules
This commit is contained in:
Carlos R. L. Rodrigues
2023-03-15 12:09:45 -03:00
committed by GitHub
parent 8e78c533c4
commit 77d46220c2
65 changed files with 1116 additions and 1011 deletions

View File

@@ -2,12 +2,10 @@ import { ModuleExports } from "@medusajs/modules-sdk"
import InMemoryCacheService from "./services/inmemory-cache"
const loaders = []
const service = InMemoryCacheService
const moduleDefinition: ModuleExports = {
service,
loaders,
}
export default moduleDefinition

View File

@@ -59,6 +59,8 @@ class InMemoryCacheService implements ICacheService {
this.invalidate(key)
}, ttl * 1000)
ref.unref()
this.timoutRefs.set(key, ref)
this.store.set(key, record)
}