Skip to content

Commit

Permalink
Add warning about registering a keyer for fetchers with a custom data…
Browse files Browse the repository at this point in the history
… type. (#2789)
  • Loading branch information
colinrtwhite authored Jan 15, 2025
1 parent 2f62c8f commit 49e8009
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coil-core/src/commonMain/kotlin/coil3/fetch/Fetcher.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package coil3.fetch
import coil3.Image
import coil3.ImageLoader
import coil3.decode.ImageSource
import coil3.key.Keyer
import coil3.request.Options

/**
Expand All @@ -13,6 +14,9 @@ import coil3.request.Options
* - Uses the data as a key to fetch bytes from a remote source (e.g. network, disk)
* and exposes it as an [ImageSource].
* - Reads the data directly and translates it into an [Image].
*
* NOTE: [Fetcher]s that use a custom data type need to register a [Keyer] for the same data type
* to have its results cached by the memory cache.
*/
fun interface Fetcher {

Expand Down

0 comments on commit 49e8009

Please sign in to comment.