背景
构建一个高效且可伸缩的结果缓存,从多个方案中分析优缺点并最终搞一个最佳实践
前置内容说明 public interface Computable <A,V>{ V compute(A arg) throws InterruptedException; } public class ExpensiveFunction implements Computable<String, BigInteger> { @Override public BigInteger compute(String arg) throws InterruptedException { //经过较长时间计算后的操作 return new BigInteger(arg); } } 前置内容说明 p