Using `Effect.cachedFunction` for caching with configurable TTLs based on update frequency
Hi all, I'm looking for advice on a design problem. I have an expensive time series API that pulls from a set of tables with variable scheduled updates: some update every 15 minutes, or 1 hour, or 24 hours, and so on. I'd like to cache the results of the query and configure a TTL depending on how often the underlying table is updated. Is this a good use case for
Effect.cachedFunction
Effect.cachedFunction
? Is it possible to configure the TTL for cached functions?