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

Enable custom disk cache for data publishers #553

Merged
merged 3 commits into from
Jun 10, 2022
Merged

Conversation

kean
Copy link
Owner

@kean kean commented Jun 10, 2022

Enable disk cache (DataCaching) for data publishers:

let request = ImageRequest(id: "a", data: Just(Test.data))

There are a few options to disable it:

  • Create a pipeline with no disk cache (default behavior)
  • Implement ImagePipelineDelegate method dataCache(for:pipeline:) or willCache(data:image:for:pipeline:) and disable cache on per-request basis
  • Pass .disableDiskCacheWrites option to requests backed by data publishers

@kean kean changed the base branch from master to nuke-11 June 10, 2022 20:44
kean referenced this pull request in matthiasbuettner159/Nuke Jun 10, 2022
@kean kean merged commit c263c57 into nuke-11 Jun 10, 2022
@kean kean mentioned this pull request Jun 10, 2022
@kean kean deleted the data-cache-for-publisher branch June 12, 2022 04:28
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