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

Glide Custom Cache key #5478

Open
CupidChow opened this issue Feb 11, 2025 · 1 comment
Open

Glide Custom Cache key #5478

CupidChow opened this issue Feb 11, 2025 · 1 comment

Comments

@CupidChow
Copy link

I load image by using load(customModel) instead of load(imageUrl) directly,and there are some extra data in the custom model,like uid and imageurl etc...,and In the class customLoader which implements ModelLoader class,I use uid in the customModel class as the cache key,like ObjectKey(model.uid),now I have a problem,after several days,when I load image ,I can't hit the disk cache and have to load image from network again.I don't know why

@CupidChow
Copy link
Author

according to the official document,I have to override equal and hashcode method in customModel,but I checked the glide source code,it seems like this only affects the memory cache if I am right.and even I override these two methods,it still doesn't work

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

No branches or pull requests

1 participant