Jakub Pi
03/29/2020, 10:46 PMMap<FileKey, Deferred<String>>
where I want to cache (expensive-to-compute) SHA-512 results. My objective is to only calculate hash values once, on the first retrieval from the Map. So I know I want some kind of Future object. I know I can start the computation in the getter (unless it's already complete) and then just return the result normally. But is Deferred the best way to do this or is there a different construct/pattern I should be looking at instead? I probably want to block on the retrieval, so Deferred may not be the best choice.rrva
03/30/2020, 6:03 AMJakub Pi
03/30/2020, 2:56 PM