Skip to content

Commit 7bfe325

Browse files
committed
- OCResourceManager: fix accidental increase of cache size to unlimited - and instead implement what was intended: prevent caching altogether
1 parent 30dc529 commit 7bfe325

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ownCloudSDK/Core/Resources/Manager/OCResourceManager.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ - (void)setMemoryConfiguration:(OCPlatformMemoryConfiguration)memoryConfiguratio
6363
switch (_memoryConfiguration)
6464
{
6565
case OCPlatformMemoryConfigurationDefault:
66+
if (_cache == nil) {
67+
_cache = [OCCache new];
68+
}
6669
_cache.countLimit = OCCacheLimitNone;
6770
break;
6871

6972
case OCPlatformMemoryConfigurationMinimum:
70-
_cache.countLimit = 0;
73+
_cache = nil; // Do not perform any caching
7174
break;
7275
}
7376
}

0 commit comments

Comments
 (0)