Skip to content

Commit

Permalink
Delete LRUCache in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyosung-finda committed Jan 21, 2024
1 parent 31f401b commit 9250138
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion Sources/Private/EmbeddedLibraries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ This directory includes the source code of libraries that are embedded within lo
This includes:
- ZipFoundation (https://github.com/weichsel/ZIPFoundation)
- EpoxyCore (https://github.com/airbnb/epoxy-ios)
- LRUCache (https://github.com/nicklockwood/LRUCache)

Lottie is distributed via multiple package managers (SPM, Cocoapods, Carthage, and NPM),
each with different packaging and compilation requirements.
Expand Down
2 changes: 1 addition & 1 deletion Sources/Public/AnimationCache/AnimationCacheProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// Animation Cache is used when loading `LottieAnimation` models. Using an Animation Cache
/// can increase performance when loading an animation multiple times.
///
/// Lottie comes with a prebuilt LRU Animation Cache.
/// Lottie comes with a prebuilt Animation Cache.
public protocol AnimationCacheProvider: AnyObject, Sendable {

func animation(forKey: String) -> LottieAnimation?
Expand Down
2 changes: 1 addition & 1 deletion Sources/Public/DotLottie/Cache/DotLottieCache.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// LRUDotLottieCache.swift
// DotLottieCache.swift
// Lottie
//
// Created by Evandro Hoffmann on 20/10/22.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/// DotLottie Cache is used when loading `DotLottie` models. Using a DotLottie Cache
/// can increase performance when loading an animation multiple times.
///
/// Lottie comes with a prebuilt LRU DotLottie Cache.
/// Lottie comes with a prebuilt DotLottie Cache.
public protocol DotLottieCacheProvider: Sendable {

func file(forKey: String) -> DotLottieFile?
Expand Down
18 changes: 9 additions & 9 deletions Sources/Public/DotLottie/DotLottieFileHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ extension DotLottieFile {
/// Please use the asynchronous methods whenever possible. This operation will block the Thread it is running in.
///
/// - Parameter filepath: The absolute filepath of the lottie to load. EG "/User/Me/starAnimation.lottie"
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `DotLottieCache.sharedCache`. Optional.
public static func loadedFrom(
filepath: String,
dotLottieCache: DotLottieCacheProvider? = DotLottieCache.sharedCache)
Expand Down Expand Up @@ -51,7 +51,7 @@ extension DotLottieFile {
/// - Parameter name: The name of the lottie file without the lottie extension. EG "StarAnimation"
/// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main`
/// - Parameter subdirectory: A subdirectory in the bundle in which the lottie is located. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `DotLottieCache.sharedCache`. Optional.
public static func named(
_ name: String,
bundle: Bundle = Bundle.main,
Expand Down Expand Up @@ -117,7 +117,7 @@ extension DotLottieFile {
/// - Parameter name: The name of the lottie file without the lottie extension. EG "StarAnimation"
/// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main`
/// - Parameter subdirectory: A subdirectory in the bundle in which the lottie is located. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `DotLottieCache.sharedCache`. Optional.
@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
public static func named(
_ name: String,
Expand All @@ -138,7 +138,7 @@ extension DotLottieFile {
/// - Parameter name: The name of the lottie file without the lottie extension. EG "StarAnimation"
/// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main`
/// - Parameter subdirectory: A subdirectory in the bundle in which the lottie is located. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `DotLottieCache.sharedCache`. Optional.
/// - Parameter dispatchQueue: A dispatch queue used to load animations. Defaults to `DispatchQueue.global()`. Optional.
/// - Parameter handleResult: A closure to be called when the file has loaded.
public static func named(
Expand All @@ -164,7 +164,7 @@ extension DotLottieFile {

/// Loads an DotLottie from a specific filepath.
/// - Parameter filepath: The absolute filepath of the lottie to load. EG "/User/Me/starAnimation.lottie"
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `LRUDotLottieCache.sharedCache`. Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lotties. Defaults to `DotLottieCache.sharedCache`. Optional.
@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
public static func loadedFrom(
filepath: String,
Expand Down Expand Up @@ -203,7 +203,7 @@ extension DotLottieFile {
/// Loads a DotLottie model from the asset catalog by its name. Returns `nil` if a lottie is not found.
/// - Parameter name: The name of the lottie file in the asset catalog. EG "StarAnimation"
/// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main`
/// - Parameter dotLottieCache: A cache for holding loaded lottie files. Defaults to `LRUDotLottieCache.sharedCache` Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lottie files. Defaults to `DotLottieCache.sharedCache` Optional.
@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
public static func asset(
named name: String,
Expand All @@ -221,7 +221,7 @@ extension DotLottieFile {
/// Loads a DotLottie model from the asset catalog by its name. Returns `nil` if a lottie is not found.
/// - Parameter name: The name of the lottie file in the asset catalog. EG "StarAnimation"
/// - Parameter bundle: The bundle in which the lottie is located. Defaults to `Bundle.main`
/// - Parameter dotLottieCache: A cache for holding loaded lottie files. Defaults to `LRUDotLottieCache.sharedCache` Optional.
/// - Parameter dotLottieCache: A cache for holding loaded lottie files. Defaults to `DotLottieCache.sharedCache` Optional.
/// - Parameter dispatchQueue: A dispatch queue used to load animations. Defaults to `DispatchQueue.global()`. Optional.
/// - Parameter handleResult: A closure to be called when the file has loaded.
public static func asset(
Expand Down Expand Up @@ -269,7 +269,7 @@ extension DotLottieFile {
/// Loads a DotLottie animation asynchronously from the URL.
///
/// - Parameter url: The url to load the animation from.
/// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LRUAnimationCache.sharedCache`. Optional.
/// - Parameter animationCache: A cache for holding loaded animations. Defaults to `DotLottieCache.sharedCache`. Optional.
@available(iOS 13.0, macOS 10.15, tvOS 13.0, *)
public static func loadedFrom(
url: URL,
Expand All @@ -287,7 +287,7 @@ extension DotLottieFile {
/// Loads a DotLottie animation asynchronously from the URL.
///
/// - Parameter url: The url to load the animation from.
/// - Parameter animationCache: A cache for holding loaded animations. Defaults to `LRUAnimationCache.sharedCache`. Optional.
/// - Parameter animationCache: A cache for holding loaded animations. Defaults to `DotLottieCache.sharedCache`. Optional.
/// - Parameter handleResult: A closure to be called when the animation has loaded.
public static func loadedFrom(
url: URL,
Expand Down

0 comments on commit 9250138

Please sign in to comment.