Doing a quick search I have found several libraries reimplementing NSCache, but haven't found a single one where the get function also takes in a block to calculate the value and then either calls that block inside a task and saves the task to the cache or awaits the already existing task.
I don't think it even needs any other public functions, just init and get.
Haven't used it in a project yet but the tests should cover the cases of how people might use it. Was thinking of making it a ~Copyable struct but that prevents people from directly using it (for example DelayedCacheItemTests.basicUsage() would require you to wrap it in a class yourself).