         guard permanentCacheCompletionManager.add(completion, priority: priority, forGroup: groupKey, identifier: identifier, token: token) else {
             return
         }
-        let moc = self.managedObjectContext
-        moc.perform {
+        let task = Background.manager.beginTask()
+        perform { (moc) in
             if let item = self.fetchCacheItem(key: key, variant: variant, moc: moc) {
                 if let group = self.fetchOrCreateCacheGroup(key: groupKey, moc: moc) {
                     group.addToCacheItems(item)

        }
    }
    
    @objc public func removePermanentlyCachedImages(groupKey: String, completion: @escaping () -> Void) {
        let moc = self.managedObjectContext
        let fm = self.fileManager
        moc.perform {
            self.permanentCacheCompletionManager.cancel(group: groupKey)
            guard let group = self.fetchCacheGroup(key: groupKey, moc: moc) else {
                completion()

    }
    
    @objc public func migrateLegacyImageURLs(_ imageURLs: [URL], intoGroup group: String, completion: @escaping () -> Void) {
        let legacyCacheFolderURL = self.legacyCacheFolderURL
        let legacyCacheFolderPath = legacyCacheFolderURL.path
        perform { (moc) in
            let group = self.fetchOrCreateCacheGroup(key: group, moc: moc)
            for imageURL in imageURLs {
                let key = self.cacheKeyForURL(imageURL)
