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

resize() + onlyScaleDown() should not affect cache key if no resize happens. #2072

Open
NightlyNexus opened this issue Mar 15, 2019 · 5 comments

Comments

@NightlyNexus
Copy link
Contributor

No description provided.

@JakeWharton
Copy link
Member

Makes sense. Implications are non-trivial I think...

@NightlyNexus
Copy link
Contributor Author

NightlyNexus commented Mar 16, 2019

yeah, pretty sure this is tricky. the cache key is created at request time but we'd need to edit it afterward for this.
i think it's a worthwhile optimization, though. i saw a case of it in our app.

maybe a new type of cache key.

@JakeWharton
Copy link
Member

JakeWharton commented Mar 16, 2019 via email

@NightlyNexus
Copy link
Contributor Author

NightlyNexus commented Mar 18, 2019

on the other hand, if i call load(url).resize(500, 500).onlyScaleDown() and then call load(url).resize(500, 500).onlyScaleDown() again, i don't want to download the image again.
the cache key would need to match on both the original request and the result for this feature.

@JakeWharton
Copy link
Member

JakeWharton commented Mar 18, 2019 via email

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

2 participants