File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Sources/PowerSync/attachments Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,15 @@ public extension AttachmentQueueProtocol {
226226 }
227227 }
228228 }
229+
230+ func expireCache( ) async throws {
231+ try await attachmentsService. withContext { context in
232+ var done = false
233+ repeat {
234+ done = try await self . syncingService. deleteArchivedAttachments ( context)
235+ } while !done
236+ }
237+ }
229238}
230239
231240/// Class used to implement the attachment queue
@@ -430,15 +439,6 @@ public actor AttachmentQueue: AttachmentQueueProtocol {
430439 closed = true
431440 }
432441
433- public func expireCache( ) async throws {
434- try await attachmentsService. withContext { context in
435- var done = false
436- repeat {
437- done = try await self . syncingService. deleteArchivedAttachments ( context)
438- } while !done
439- }
440- }
441-
442442 /// Clears the attachment queue and deletes all attachment files
443443 public func clearQueue( ) async throws {
444444 try await attachmentsService. withContext { context in
You can’t perform that action at this time.
0 commit comments