Microsoft KB Archive/814190

= How to control content caching in the Windows Media 9 Series platform =

Article ID: 814190

Article Last Modified on 8/4/2005

-

APPLIES TO


 * Windows Media Format 9 Series Software Development Kit
 * Microsoft Windows Media Services 9 Series
 * Windows Media 9 Series Software Development Kit
 * Microsoft Windows Media Player 9 Series
 * Microsoft Windows Media Player 9 Series

-



SUMMARY
Warning This article contains information about editing the namespace. Before you edit the namespace, verify that you have a backup copy that you can restore if a problem occurs. If you edit the namespace incorrectly, you can cause serious problems that may require you to reinstall any product that uses the namespace. Microsoft cannot guarantee that problems that result if you incorrectly edit the namespace can be solved. Edit the namespace at your own risk. This article discusses how to control the client cache behavior on both the server and the client.

When you use Fast Cache with the Windows Media Player 9 Series or later versions, you can stream content to clients faster than the data rate that is specified by the stream format. For example, using Fast Cache, the server can transmit a 128-kilobits-per-second (Kbps) stream at 700 Kbps. The stream is still rendered in Windows Media Player at the specified data rate, but the client can buffer a much larger portion of the content before rendering it. This allows the client to handle variable network conditions without a perceptible impact on the playback quality of either on-demand or broadcast content. This ability is useful in the following situations:
 * When the available network bandwidth of the client exceeds the required bandwidth of the content. For example, clients that use a cable modem, DSL connection, or corporate intranets.
 * When the network connectivity is intermittent or has high latency. For example, wireless networks.
 * When the quality of the content received is of paramount importance. For example, businesses that provide pay-per-view movies.
 * When streaming variable bit-rate (VBR) video.
 * When you want to control the rate of playback in the client application.
 * When you want to play back content even when the server is unavailable.

Server Side
On the server side, you control caching on the client by means of the Fast Cache property. When you enable this property, the client knows that the content can be cached. You can set this property in the General category on a Publishing Point's Properties tab.

You can also use this feature in conjunction with the Fast Cache Delivery Rate and Fast Start Bandwidth. Both of these are configurable in the Limits category on a Publishing Point's Properties tab. These limits will help prevent network saturation when there is heavy traffic on the server. The Fast Start Bandwidth is the maximum bandwidth that will be used to deliver content. The Fast Cache Delivery Rate is a multiple of the current content bit rate that can be used to deliver data to the client. If the content bit rate multiplied by the Fast Cache Delivery Rate is greater than the Fast Start Bandwidth, then delivery will be limited by the value set in Fast Start Bandwidth.

Service providers also can set the cache expiration for content at a Publishing Point level. By configuring this value, a content host can gain the benefits of Fast Cache, and not have the content live indefinitely in the user cache. This is configured through the Cache Expiration property in the Cache/Proxy category on a Publishing Point's Properties tab. For more information about these settings, see the Windows Media Services Help documentation.

Note: To protect your content from unauthorized recording or replication, use Digital Rights Management (DRM) technology.

Client Side
Web designers can author the links to content to control caching behavior from the client. You do this through the use of query string parameters. You can add the following query string parameter to a client request that will control behavior: ?wmcache=VALUE Where VALUE can equal 1 or 0. 1 = Allow Caching 0 = Disallow Caching For more information about additional query strings that are available, click the following article number to view the article in the Microsoft Knowledge Base:

315959 Additional query strings for Windows Media Player

If the client is using caching, the client, after doing a freshness check, will play back content from the cache. In testing, you may not always want this to occur. You can clear the client-side cache by deleting the files in the Internet Explorer browser cache.

Note: You can also set the cache property in the client namespace on a computer. However, if you set this value, all Windows Media SDK-based applications on the client computer are affected. Therefore, Microsoft recommends that you use the methods mentioned earlier in this article instead.

To set the cache property, follow these steps:  Change to the directory where the namespace file is located:

%SystemDrive%\Documents and Settings\ \Local Settings\Application Data\Microsoft\Windows Media\9.0

where  is the name of a stored local user profile. Open the Wmsdkns.xml file in a text editor, such as Notepad.  Locate the Shared Properties node in the Network Source node. If it does not exist, you have to create it:    Add the following line under the Shared Properties sub-node:   Save changes, and then restart the computer.

Another representation of the code that you can add to the Wmsdkns.xml file is as follows:  ...     <node name=&quot;Shared Properties&quot; opcode=&quot;create&quot; > <node name=&quot;OpportunisticStreamingEnabled&quot; opcode=&quot;create&quot; type=&quot;boolean&quot; value=&quot;false&quot; /> ...

Additional query words: &quot;9 Series&quot; namespace WMCache Fast Cache

Keywords: kbhowto kbdswwmm2003swept KB814190

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.