Skip to content

Improve cache and load keys support#255

Merged
kean merged 2 commits into
nuke8from
customizing-keys
Jun 1, 2019
Merged

Improve cache and load keys support#255
kean merged 2 commits into
nuke8from
customizing-keys

Conversation

@kean

@kean kean commented Jun 1, 2019

Copy link
Copy Markdown
Owner
  • 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