Coder Social home page Coder Social logo

Comments (5)

kean avatar kean commented on June 1, 2024

If you are using the built-in DataCache, it has a so-called staging area where it stores the data while it's being saved on disk asynchronously, so there is no need to wait until it finishes. It's a documented behavior, so you can rely on it continuing working this way.

from nuke.

AndrewSB avatar AndrewSB commented on June 1, 2024

i believe i am, but i'm noticing a slight delay. my flow is

  1. cache the image
  2. in parallel, fetch the image and show it in a view that's presented modally

the image shows up black (i.e., i think it fails to load).

if i dismiss the modal, then re-present it, i think it works. so likely, there's something with threading/waiting for the staging area to accept the value before i try to fetch it

is there some way i can syncronize that? by submitting the logic to present the modal to a certain thread, or waiting for a notification to fire?

from nuke.

kean avatar kean commented on June 1, 2024

Hey, can you please share the code that you are using?

There is a public API: flush(for:) that clears the staging area and puts the data on disk immediately. But there should be no need in using it, so I'm not sure it's going to help in this case. The root cause is likely somewhere else.

from nuke.

AndrewSB avatar AndrewSB commented on June 1, 2024

#755 is how i'm using the API. from running the test i just wrote, it looks like it doesn't result in a cache hit

from nuke.

AndrewSB avatar AndrewSB commented on June 1, 2024

solved by the PR

from nuke.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.