I want to use below code in my application
LoadingCache<Key, Graph> graphs = Caffeine.newBuilder()
.maximumSize(10_000)
.build(key -> createExpensiveGraph(key));
But, I am so dumb in multithreading that I could not figure it out how do I implement the function createExpensiveGraph. Please help.