From a6aff7a3ce0b8951b82f0f8142341d32f6513ccd Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Wed, 22 Jan 2025 10:45:52 +0100 Subject: [PATCH] - OCResourceManager: fix accidental increase of cache size to unlimited - and instead implement what was intended: prevent caching altogether --- ownCloudSDK/Core/Resources/Manager/OCResourceManager.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ownCloudSDK/Core/Resources/Manager/OCResourceManager.m b/ownCloudSDK/Core/Resources/Manager/OCResourceManager.m index cb287952..f5739f24 100644 --- a/ownCloudSDK/Core/Resources/Manager/OCResourceManager.m +++ b/ownCloudSDK/Core/Resources/Manager/OCResourceManager.m @@ -63,11 +63,14 @@ - (void)setMemoryConfiguration:(OCPlatformMemoryConfiguration)memoryConfiguratio switch (_memoryConfiguration) { case OCPlatformMemoryConfigurationDefault: + if (_cache == nil) { + _cache = [OCCache new]; + } _cache.countLimit = OCCacheLimitNone; break; case OCPlatformMemoryConfigurationMinimum: - _cache.countLimit = 0; + _cache = nil; // Do not perform any caching break; } }