Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Oct 15, 2023
1 parent af70027 commit bb5d936
Show file tree
Hide file tree
Showing 6 changed files with 609 additions and 371 deletions.
2 changes: 1 addition & 1 deletion Sources/Cache/Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public enum StorageExpiration {
public enum ExpirationExtending {
/// The item expires after the original time, without extending after access.
case none
/// The item expiration extends by the original cache time after each access.
/// The item expiration extends to the original cache time after each access.
case cacheTime
/// The item expiration extends by the provided time after each access.
case expirationTime(_ expiration: StorageExpiration)
Expand Down
2 changes: 2 additions & 0 deletions Sources/General/ImageSource/Resource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ extension Resource {
/// - Parameter overrideCacheKey: The key should be used to override the ``Resource/cacheKey`` when performing the
/// conversion. `nil` if not overriden and ``Resource/cacheKey`` of `self` is used.
/// - Returns: The converted source.
///
public func convertToSource(overrideCacheKey: String? = nil) -> Source {
let key = overrideCacheKey ?? cacheKey
return downloadURL.isFileURL ?
Expand Down Expand Up @@ -74,6 +75,7 @@ extension KF {
/// - cacheKey:
/// The cache key. If `nil`, Kingfisher will use the `absoluteString` of ``ImageResource/downloadURL`` as
/// the key. Default is `nil`.
///
public init(downloadURL: URL, cacheKey: String? = nil) {
self.downloadURL = downloadURL
self.cacheKey = cacheKey ?? downloadURL.cacheKey
Expand Down
8 changes: 5 additions & 3 deletions Sources/General/ImageSource/Source.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@

import Foundation


/// Represents an image source setting for Kingfisher methods.
///
/// A `Source` value indicates the way in which the target image can be retrieved and cached.
/// A ``Source`` value indicates the way in which the target image can be retrieved and cached.
///
/// - network: The target image should be retrieved from the network remotely. The associated ``Resource``
/// - `network`: The target image should be retrieved from the network remotely. The associated ``Resource``
/// value defines detailed information like image URL and cache key.
/// - provider: The target image should be provided in a data format. Normally, it can be an image
/// - `provider`: The target image should be provided in a data format. Normally, it can be an image
/// from local storage or in any other encoding format (like Base64).
///
public enum Source {

/// Represents the source task identifier when setting an image to a view with extension methods.
Expand Down
Loading

0 comments on commit bb5d936

Please sign in to comment.