So, I have two problems right now with the unstable_cache. Obviously, the cache is very useful when dealing with computationally heavy server-side tasks.
Problem 1
Say cache is in need of revalidation, if a ton of people query the cache at the same time, and the cache is stale, it runs the function FOR ALL OF THEM. So if it is highly computational heavy it will then be running the function for each of them. Is there any way around this?
Problem 2
According to what I have been told in here, what the documentation would lead me to believe, and what the #1089389297548931182 has told me, if the cache is stale, then the stale data will be provided and the function will run in the background. This is not what I am observing at all. When the cache is stale, it will go and run the entire thing again and the client will have to wait until it is finished to get the latest data, which is not the behavior I want. Is there any way to get it to provide the stale cache data and then run the function for displaying next time?
Thanks!