Caching and Regularly Re-acquiring Resources with `Effect.acquireRelease`
Is there a way to cache an
A naive implementation with
I'd like to be able to re-use a resource multiple times while making sure it's cleaned and re-created regularly.
Effect.aquireRelease to make the resource be cleared and re-acquired regulary?A naive implementation with
Effect.cachedInvalidateWithTTL keeps all the resources until the main scope is closed which is not what I want (see this playground for this naive implementation)I'd like to be able to re-use a resource multiple times while making sure it's cleaned and re-created regularly.
