         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()

                } catch let error {
                    DDLogError("Error moving cached file: \(error)")
                }
                self.perform { (moc) in
                    guard createItem else {
                        self.permanentCacheCompletionManager.complete(groupKey, identifier: identifier, enumerator: { (completion) in
                            completion.failure(ImageControllerError.fileError)
