Skip to content

Commit

Permalink
- OCCore: remove _thumbnailCache (unused today, left-over from before…
Browse files Browse the repository at this point in the history
… the OCResource* subsystem existed)
  • Loading branch information
felix-schwarz committed Jan 22, 2025
1 parent 7bfe325 commit 7665dbe
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
15 changes: 0 additions & 15 deletions ownCloudSDK/Core/OCCore+ItemUpdates.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,6 @@ - (void)performUpdatesForAddedItems:(nullable NSArray<OCItem *> *)addedItems
}];
}

// In parallel: remove thumbnails from in-memory cache for removed items
OCWaitWillStartTask(cacheUpdatesGroup);

dispatch_async(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0), ^{
for (OCItem *removeItem in removedItems)
{
if (removeItem.fileID != nil)
{
[self->_thumbnailCache removeObjectForKey:removeItem.fileID];
}
}

OCWaitDidFinishTask(cacheUpdatesGroup);
});

// Wait for updates to complete
OCWaitForCompletion(cacheUpdatesGroup);
}
Expand Down
1 change: 0 additions & 1 deletion ownCloudSDK/Core/OCCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ typedef id<NSObject> OCCoreItemTracking;

OCSignalManager *_signalManager;

OCCache<OCFileID,OCItemThumbnail *> *_thumbnailCache;
NSMutableDictionary <NSString *, NSMutableArray<OCCoreThumbnailRetrieveHandler> *> *_pendingThumbnailRequests;

NSMutableDictionary <OCIPCNotificationName, id> *_remoteSyncEngineTriggerAcknowledgements;
Expand Down
13 changes: 0 additions & 13 deletions ownCloudSDK/Core/OCCore.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,6 @@ - (instancetype)initWithBookmark:(OCBookmark *)bookmark

_claimTokensByClaimIdentifier = [NSMapTable strongToWeakObjectsMapTable];

_thumbnailCache = [OCCache new];

_queue = dispatch_queue_create("OCCore work queue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);
_connectivityQueue = dispatch_queue_create("OCCore connectivity queue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL);

Expand Down Expand Up @@ -1048,17 +1046,6 @@ - (void)setMemoryConfiguration:(OCPlatformMemoryConfiguration)memoryConfiguratio
_memoryConfiguration = memoryConfiguration;

self.vault.resourceManager.memoryConfiguration = memoryConfiguration;

switch (_memoryConfiguration)
{
case OCPlatformMemoryConfigurationDefault:
_thumbnailCache.countLimit = OCCacheLimitNone;
break;

case OCPlatformMemoryConfigurationMinimum:
_thumbnailCache.countLimit = 0;
break;
}
}

#pragma mark - Inter-Process change notification/handling
Expand Down

0 comments on commit 7665dbe

Please sign in to comment.