I have replied here: Peplink mediafast 500 - Supported Media Caching - #2 by MartinLangmaid
You can put the mediafast inline to act as a SSL proxy and so it can cache encrypted content, however there are additional complexities there. Youtube uses a CDN for example where I user can stream a video from one URL on their CDN and the next user who tries to do that will have a stream served from another CDN/URL so mediafast doesn’t know its the same stream / file and doesn’t send cached copy.