From 8cf52972bb59f38448015fcff2a952e00bf8904b Mon Sep 17 00:00:00 2001 From: Valere Date: Fri, 24 May 2024 16:13:31 +0200 Subject: [PATCH] ffi-crypto-bindings: Improve comments --- bindings/matrix-sdk-crypto-ffi/src/machine.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bindings/matrix-sdk-crypto-ffi/src/machine.rs b/bindings/matrix-sdk-crypto-ffi/src/machine.rs index 5b0b7a68c..a0cfdd757 100644 --- a/bindings/matrix-sdk-crypto-ffi/src/machine.rs +++ b/bindings/matrix-sdk-crypto-ffi/src/machine.rs @@ -1537,6 +1537,11 @@ impl OlmMachine { /// Clear any in-memory caches because they may be out of sync with the /// underlying data store. + /// + /// The crypto store layer is caching olm sessions for a given device. + /// When used in a multi-process context this cache will get outdated. + /// If the machine is used by another process, the cache must be invalidating when the + /// main process is resumed. pub async fn clear_crypto_cache(&self) { self.runtime.block_on(self.inner.clear_crypto_cache()) }