Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coil with caching #17

Closed
vegeta2102 opened this issue Aug 13, 2019 · 7 comments
Closed

Coil with caching #17

vegeta2102 opened this issue Aug 13, 2019 · 7 comments
Labels
enhancement New feature or request

Comments

@vegeta2102
Copy link

Is your feature request related to a problem? Please describe.
Can you write something doc or example about usage of cache image with Coil ?
I really consider about cache image in Android ( Just refer to Glide cache at link : https://bumptech.github.io/glide/doc/caching.html#cache-keys )

@vegeta2102 vegeta2102 added the enhancement New feature or request label Aug 13, 2019
@isfaaghyth
Copy link

are you looking for this one?
https://github.com/coil-kt/coil/blob/master/docs/faq.md

@franciscoaleixo
Copy link

franciscoaleixo commented Aug 13, 2019

Also, does Coil have a multi-layered cache and does it support transformation caching? I.e., does it ever cache to memory, besides disk? Does it cache transformed images and not just the source image? These are very important things (to me) that would be really useful (and present in Glide, for example).

If it just caches through OkHttp it might be very limiting but I'm not versed enough in their caching to know so any input is welcome.

@colinrtwhite
Copy link
Member

I added a section about disk caching to the FAQ here: https://coil-kt.github.io/coil/faq/#how-do-i-set-up-disk-caching

Coil does not support writing Transformations back to the disk cache - they're only cached in memory. This let's us remove a lot of complexity that exists within Glide and let's us avoid re-implementing OkHttp's disk cache.

Coil keeps an in-memory cache for BitmapDrawables, though I'm in the process of adjusting it to support all Drawables.

@vegeta2102
Copy link
Author

@colinrtwhite
I have looked into . Thanks!
https://github.com/coil-kt/coil/blob/master/docs/faq.md

btw, does Coil support setting up memory cache for specific image ?
If we configure image cache as above URL. It'll be affect all .

@colinrtwhite
Copy link
Member

@vegeta2102 You can disable memory caching on a per-request basis like this:

imageView.load(url) {
    memoryCachePolicy(CachePolicy.DISABLED)
}

@lucianoluzzi
Copy link

@vegeta2102 You can disable memory caching on a per-request basis like this:

imageView.load(url) {
    memoryCachePolicy(CachePolicy.DISABLED)
}

Was looking for a way to do so.
Maybe should this be documented in the ImageLoaders or Caching part of the docs?

@davo417
Copy link

davo417 commented Aug 3, 2021

@vegeta2102 You can disable memory caching on a per-request basis like this:

imageView.load(url) {
    memoryCachePolicy(CachePolicy.DISABLED)
}

Was looking for a way to do so.
Maybe should this be documented in the ImageLoaders or Caching part of the docs?

It is: https://coil-kt.github.io/coil/getting_started/#preloading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants