Set LRU values to zero to prevent cleanup when using encryption

This commit is contained in:
Half-Shot 2023-01-18 17:13:16 +00:00
parent b08ca20803
commit 73f0d55741

View File

@ -38,6 +38,10 @@ export function getAppservice(config: BridgeConfig, registration: IAppserviceReg
}, },
storage: storage, storage: storage,
intentOptions: { intentOptions: {
// If encryption support is enabled, we cannot expire Intent objects or we risk
// a resource contention on the Sled DB.
maxCached: config.encryption && 0,
maxAgeMs: config.encryption && 0,
encryption: !!config.encryption, encryption: !!config.encryption,
}, },
cryptoStorage: cryptoStorage, cryptoStorage: cryptoStorage,