How to create a "pre-cached" build for remote contents?

Similar to this thread Using local files while remote are being downloaded. . So you have to implement a custom fallback feature on the application level. #6 describes a detailed flow.