Effect CommunityEC
Effect Community6mo ago
8 replies
Afonso Matos

Implementing a Method with Shared Resolution for Concurrent Calls and Fresh Calls for Non-Concurr...

How can I implement the following behaviour with cluster:

1. I want to have a method (scrapeSitemapURL) in an entity.
2. If there are multiple concurrent calls, it should only resolve once, so it doesn't duplicate resources.
3. However, every non-concurrent call should call that method fresh, not rely on any old cache.


If I use the URL as the key...

If I turn persistence off, the (2) is not satisfied.
If I turn persistence on, the (3) is not satisfied.
Was this page helpful?