Skip to content

Commit

Permalink
- OCResourceManager: fix accidental increase of cache size to unlimit…
Browse files Browse the repository at this point in the history
…ed - and instead implement what was intended: prevent caching altogether
  • Loading branch information
felix-schwarz committed Jan 22, 2025
1 parent e57ad35 commit a6aff7a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ownCloudSDK/Core/Resources/Manager/OCResourceManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit a6aff7a

Please sign in to comment.