Say I have an origin site and structure of media like so:
https://watch.example.com/2017-04-06/training.mp4, which is a static 5GB that will never change.
Now at a remote location with very poor internet, I want to provide a caching proxy which mounts a 4TB disk (that I've sent in advance) that has these files sitting in a directory like /media/2017-04-06/training.mp4
, so when the http://cache.local/2017-04-06/training.mp4 is accessed, it plays back the locally cached content. If it fails, the caching proxy might download from https://watch.example.com/2017-04-06/training.mp4 or the media player client might be coded to fallback to the canonical https://watch.example.com/2017-04-06/training.mp4.
So after investigating nginx, it unfortunately saves the content and headers in a md5sum arrangement at proxy_cache_path
, which makes my aim to pre-cache or prime the cache by disk difficult.
Is there some other simpler solution I am missing?