optimized createCachedResource