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

Improve cache and load keys support #255

Merged
merged 2 commits into from
Jun 1, 2019
Merged

Improve cache and load keys support #255

merged 2 commits into from
Jun 1, 2019

Conversation

kean
Copy link
Owner

@kean kean commented Jun 1, 2019

  • Add filteredURL option to ImageRequestOptions

In some cases your image URLs might contains transient query parameters like access tokens which must be ignored when generating cache keys. If that's the case, set this property to a URL without the unwanted fields:

let request = ImageRequest(
    url: URL(string: "http://example.com/image.jpeg?token=1")! ,
    options: .init(filteredURL: "http://example.com/image.jpeg")
)

This option affects both memory and disk caches.

  • Refactor the way cache and load keys are created and used

@kean kean merged commit 9550afc into nuke8 Jun 1, 2019
@kean kean deleted the customizing-keys branch June 2, 2019 12:21
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

Successfully merging this pull request may close these issues.

1 participant