Skip to content

Commit 9118b1d

Browse files
committed
fix(scheduler-utils): fix accidental change in scheduler utils
1 parent b12602d commit 9118b1d

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

scheduler-utils/src/client/in-memory.js

+18-4
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,29 @@ export function createLruCache ({ size }) {
2929
}
3030

3131
export function getByProcessWith ({ cache = internalCache }) {
32-
return async (processId) => {
32+
return async (process) => {
3333
if (!internalSize) return
34-
return cache.get(processId)
34+
return cache.get(process)
3535
}
3636
}
3737

3838
export function setByProcessWith ({ cache = internalCache }) {
39-
return async (processId, processData) => {
39+
return async (process, { url, address }, ttl) => {
4040
if (!internalSize) return
41-
return cache.set(processId, processData)
41+
return cache.set(process, { url, address }, { ttl })
42+
}
43+
}
44+
45+
export function getByOwnerWith ({ cache = internalCache }) {
46+
return async (owner) => {
47+
if (!internalSize) return
48+
return cache.get(owner)
49+
}
50+
}
51+
52+
export function setByOwnerWith ({ cache = internalCache }) {
53+
return async (owner, url, ttl) => {
54+
if (!internalSize) return
55+
return cache.set(owner, { url, address: owner }, { ttl })
4256
}
4357
}

servers/mu/src/domain/clients/in-memory.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export function getByProcessWith ({ cache = internalCache }) {
3636
}
3737

3838
export function setByProcessWith ({ cache = internalCache }) {
39-
return async (processId, processData, ttl) => {
39+
return async (processId, processData) => {
4040
if (!internalSize) return
41-
return cache.set(processId, processData, { ttl })
41+
return cache.set(processId, processData)
4242
}
4343
}

0 commit comments

Comments
 (0)