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 (
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.
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.
