'Setup HLS caching policy

As soon as EXT-X-ALLOW-CACHE deprecated and removed from protocol specification is there alternative way to setup caching policy for a stream? (my goal is to enable caching on client)

Also I want to get rid of error while validating stream with mediastreamvalidator:

MUST fix issues
--------------------------------------------------------------
Error: #EXT-X-ALLOW-CACHE has been deprecated
--> Detail:  Line: #EXT-X-ALLOW-CACHE:NO


Solution 1:[1]

You can use AVFoundation on iOS 10+:

Playing Offline HLS Content

Starting with iOS 10, you can use AVFoundation to download HTTP Live Streaming assets to an iOS device. This new capability allows users to download and store HLS movies on their devices while they have access to a fast, reliable network, and watch them later without a network connection. With the introduction of this capability, HLS becomes even more versatile by minimizing the impact of inconsistent network availability on the user experience

Source: Working with HTTP Live Streaming

Solution 2:[2]

Old question, but perhaps will help someone:

The only thing that seems to work for HLS caching is running your own caching reverse-proxy within your app. Madness, but it really works well.

This proxy HLSCachingReverseProxyServer from devxoul as mentioned in this comment is a great drop in option, and starting point for optimising caching for your needs.

It's absurd that we need to do this to make Apple's component respect something as basic as eTags.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community
Solution 2 alex bird