The default lock timeout for `getOrSet` is a static 10. We need to find a way to make this dynamic.
A `timeout` argument is already available in the method signature. Suggest using that value and add a bit of extra time for the additional get() call within the request.
Good idea. In this case, the timeout needs to take as long as it might take for another thread to fully produce the item being cached. if there was something being cached that took 15 seconds to generate, it would cause timeouts on all the other threads waiting for the generation of the data.
I am thinking that maybe this timeout should be around 45 seconds or so. In reality, if it goes beyond it then you can’t really produce the item and it should throw the exception. I am not sure anymore of making this dynamic, because in reality it should just be high enough to produce a result.