Skip to content

Commit

Permalink
Improve organization
Browse files Browse the repository at this point in the history
  • Loading branch information
calda committed Jan 2, 2024
1 parent 74586f5 commit ad0be13
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Sources/Public/DotLottie/Cache/DotLottieCache.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@

import Foundation

// MARK: - DotLottieCache

/// A DotLottie Cache that will store lottie files up to `cacheSize`.
///
/// Once `cacheSize` is reached, the least recently used lottie will be ejected.
/// The default size of the cache is 100.
public class DotLottieCache: DotLottieCacheProvider, @unchecked Sendable {
public class DotLottieCache: DotLottieCacheProvider {

// MARK: Lifecycle

Expand Down Expand Up @@ -55,3 +57,10 @@ public class DotLottieCache: DotLottieCacheProvider, @unchecked Sendable {
private var cache = LRUCache<String, DotLottieFile>()

}

// MARK: Sendable

// DotLottieCacheProvider has a Sendable requirement, but we can't
// redesign DotLottieCache to be properly Sendable without making breaking changes.
// swiftlint:disable:next no_unchecked_sendable
extension DotLottieCache: @unchecked Sendable { }

0 comments on commit ad0be13

Please sign in to comment.