Tweak cache thresholds
This commit is contained in:
1 parent
a692dddd50
commit
a60a212a10
2 files changed
+5
-5
No files matched your search
+2
-2
@@ -208,7 +208,7 @@ async function writeResponse(
|
|||||||
sessionContext.extendLock = now + 10000;
|
sessionContext.extendLock = now + 10000;
|
||||||
await cache.acquireLock(
|
await cache.acquireLock(
|
||||||
`cwmp_session_${sessionContext.deviceId}`,
|
`cwmp_session_${sessionContext.deviceId}`,
|
||||||
sessionContext.timeout + 10000,
|
sessionContext.timeout + 15000,
|
||||||
0,
|
0,
|
||||||
sessionContext.sessionId
|
sessionContext.sessionId
|
||||||
);
|
);
|
||||||
@@ -1130,7 +1130,7 @@ async function processRequest(
|
|||||||
sessionContext.extendLock = sessionContext.timestamp + 10000;
|
sessionContext.extendLock = sessionContext.timestamp + 10000;
|
||||||
await cache.acquireLock(
|
await cache.acquireLock(
|
||||||
`cwmp_session_${sessionContext.deviceId}`,
|
`cwmp_session_${sessionContext.deviceId}`,
|
||||||
sessionContext.timeout + 10000,
|
sessionContext.timeout + 15000,
|
||||||
0,
|
0,
|
||||||
sessionContext.sessionId
|
sessionContext.sessionId
|
||||||
);
|
);
|
||||||
|
|||||||
+3
-3
@@ -50,8 +50,8 @@ interface Snapshot {
|
|||||||
ui: UiConfig;
|
ui: UiConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
const REFRESH = 3000;
|
const REFRESH = 5000;
|
||||||
const EVICT_TIMEOUT = 60000;
|
const EVICT_TIMEOUT = 120000;
|
||||||
|
|
||||||
const snapshots = new Map<string, Snapshot>();
|
const snapshots = new Map<string, Snapshot>();
|
||||||
let currentSnapshot: string = null;
|
let currentSnapshot: string = null;
|
||||||
@@ -398,7 +398,7 @@ async function refresh(): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const lockToken = await cache.acquireLock("presets_hash_lock", 4000, 4000);
|
const lockToken = await cache.acquireLock("presets_hash_lock", 5000, 5000);
|
||||||
|
|
||||||
const res = await Promise.all([
|
const res = await Promise.all([
|
||||||
fetchPresets(),
|
fetchPresets(),
|
||||||
|
|||||||
Reference in new issue
Block a user