Effect CommunityEC
Effect Community3y ago
25 replies
Stephen Bluck

Issue with caching in sequential runs

const test = Effect.succeed(1).pipe(
  Effect.delay(2000), 
  Effect.cachedWithTTL('1 days'), 
  Effect.flatMap(identity)
);

Is this correct when trying to use cached effects? In my testing it doesn't seem to be working as expected. The delay still happens on sequential runs.
Was this page helpful?