Caching Successes Only with `Effect.cachedFunction`
I just found
Effect.cachedFunction which to my happy surprise not only caches the result, but also deduplicated concurrent calls it seems. The only problem I'm running into is now that errors are also cached, so when it runs in the future, the same error is returned. How can I only cache the function call if it returns a success?