• How to control Apple HLS client-caching (EXT-X-ALLOW-CACHE)

    The M3U playlist tag EXT-X-ALLOW-CACHE tag indicates whether iOS-based devices can download media segments for later replay. This article describes how to configure Wowza Media Server properties to create a properly formatted EXT-X-ALLOW-CACHE tag in chunklist.m3u8 playlist files that are delivered to iOS-based devices.

    Note: Wowza Media Server™ 3.5.2.05 (build4530) or later is required. Go to the Development Builds page to get a supported version.

    About the EXT-X-ALLOW-CACHE tag



    The EXT-X-ALLOW-CACHE tag in an M3U playlist indicates whether the client can cache downloaded media segments for later replay. It can appear once anywhere in the playlist file and applies to all segments in the playlist. Its format is:
    #EXT-X-ALLOW-CACHE:<YES|NO>
    If the playlist file contains the EXT-X-ALLOW-CACHE tag and its value is NO, then the client can't cache downloaded media segments after they've been played. Otherwise, the client can cache downloaded media segments indefinitely for later replay. By setting the value to YES, you are telling the player that it is ok to cache the content. For VOD content, this may be ok but for live content, this could cause the player to play old content instead of the current content. If the tag is not set at all then the player will decide if it will cache the content or not.

    For more information, see the HTTP Live Streaming draft-pantos-http-live-streaming-10 specification.

    Server Configuration



    This section describes how configure the property that formats the EXT-X-ALLOW-CACHE tag in M3U playlists. You can configure this property in the Application.xml file for your video on demand (VOD), live, and nDVR applications.

    For each property, the value true enables caching (#EXT-X-ALLOW-CACHE:YES) while the value false disables caching (#EXT-X-ALLOW-CACHE:NO). If a property isn't set, then the following defaults are used.

    • For VOD streaming, the header isn't displayed.
    • For live and nDVR streaming, the header is set to #EXT-X-ALLOW-CACHE:NO.


    Property for Apple HLS VOD streaming

    1. Set up an application for video on demand (VOD) streaming by following the instructions in the "Configuration" section in How to set up video on demand streaming.

    2. Open the [install-dir]/conf/[application]Application.xml file in a text editor and add the following property to the HTTPStreamer/Properties section. Be careful that you use the correct Properties section as there are multiple Properties sections in the Application.xml file:
      <Property>
      	<Name>vodCupertinoPlaylistAllowCaching</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
    3. Restart Wowza Media Server.


    Property for Apple HLS live streaming

    1. Set up an application for live streaming by following the instructions in the "Configuration" section in one of the following tutorials (select the tutorial for your encoder):

    2. Open the [install-dir]/conf/[application]Application.xml file in a text editor and add the following property to the LiveStreamPacketizer/Properties section. Be careful that you use the correct Properties section as there are multiple Properties sections in the Application.xml file:
      <Property>
      	<Name>cupertinoAllowCaching</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
    3. Restart Wowza Media Server.


    Property for Apple HLS nDVR streaming

    1. Set up an application for nDVR streaming by following the instructions in the "Basic configuration" section in How to set up and run Wowza nDVR for live streaming.

    2. Open the [install-dir]/conf/[application]Application.xml file in a text editor and add the following property to the HTTPStreamer/Properties section. Be careful that you use the correct Properties section as there are multiple Properties sections in the Application.xml file:
      <Property>
      	<Name>dvrCupertinoPlaylistAllowCaching</Name>
      	<Value>true</Value>
      	<Type>Boolean</Type>
      </Property>
    3. Restart Wowza Media Server.




    If you're having problems or want to discuss this article, post in our forum.