刚写完问题,就开始考虑使用泛型的效用方法。然后想起了Throwables的一些东西。是的,它已经在那里!)
可能还需要处理UncheckedExecutionException甚至ExecutionError。
因此解决方案是:
public Post getPost(final Integer key) throws SQLException, IOException { try { return cache.get(key, new Callable<Post>() { @Override public Post call() throws Exception { return PostsDB.findPostByID(key); } }); } catch (ExecutionException e) { Throwables.propagateIfPossible( e.getCause(), SQLException.class, IOException.class); throw new IllegalStateException(e); } catch (UncheckedExecutionException e) { Throwables.throwIfUnchecked(e.getCause()); throw new IllegalStateException(e); }}非常好!
另请参见ThrowablesExplained,LoadingCache.getUnchecked以及为什么我们不赞成Throwables.propagate的原因。



