replace repeated code with RESUtils.retrieveCacheable