CacheResponse Class

The object describing the response from the cache.

Inheritance Hierarchy

System.Object
  Microsoft.Web.Media.SmoothStreaming.CacheResponse
    Microsoft.Web.Media.SmoothStreaming.CacheResponse2

Namespace:  Microsoft.Web.Media.SmoothStreaming
Assembly:  Microsoft.Web.Media.SmoothStreaming (in Microsoft.Web.Media.SmoothStreaming.dll)

Syntax

'Declaration

Public Class CacheResponse
'Usage

Dim instance As CacheResponse
public class CacheResponse
public ref class CacheResponse
type CacheResponse =  class end
public class CacheResponse

The CacheResponse type exposes the following members.

Constructors

  Name Description
Public methodSupported by Windows Phone CacheResponse(Stream) Initializes a new instance of the CacheResponse class from a Stream object.
Public method CacheResponse(Stream, Boolean) Initializes a new instance of the CacheResponse class from a Stream object specifying whether to continue processing in case of a cache miss.
Public methodSupported by Windows Phone CacheResponse(Int64, String, WebHeaderCollection, Stream, HttpStatusCode, String, DateTime) Initializes a new instance of the CacheResponse class from the parameters.
Public method CacheResponse(Int64, String, WebHeaderCollection, Stream, HttpStatusCode, String, DateTime, Boolean) Initializes a new instance of the CacheResponse class from the parameters.

Top

Properties

  Name Description
Public propertySupported by Windows Phone ContentLength The length in bytes.
Public propertySupported by Windows Phone ContentType A string object that identifies the content type.
Public property ContinueProcessing Gets a Boolean value indicating whether cache response processing continues to the next cache module (including HTTP download) in case of a cache miss.
Public propertySupported by Windows Phone ExpiryTime A DateTime object that contains the time of response expiration.
Public propertySupported by Windows Phone Headers Gets a metadata collection of responses.
Public propertySupported by Windows Phone Response A Stream object that contains the response.
Public propertySupported by Windows Phone StatusCode An System.Net.HTTPStatusCode enumeration object.
Public propertySupported by Windows Phone StatusDescription A string that contains the status description.

Top

Methods

  Name Description
Public methodSupported by Windows Phone Equals (Inherited from Object.)
Protected methodSupported by Windows Phone Finalize (Inherited from Object.)
Public methodSupported by Windows Phone GetHashCode (Inherited from Object.)
Public methodSupported by Windows Phone GetType (Inherited from Object.)
Protected methodSupported by Windows Phone MemberwiseClone (Inherited from Object.)
Public methodSupported by Windows Phone ReadFrom Reads the response from a Stream object. There is no default implementation for this method. Calling the method without implementing an override will result in a NotSupportedException.
Public methodSupported by Windows Phone ToString (Inherited from Object.)
Public methodSupported by Windows Phone WriteTo Writes the response to a Stream object.

Top

Remarks

The CacheResponse class supports offline playback scenarios. When the SmoothStreamingMediaElement needs a chunk or manifest, it first checks with the registered cache plug-in. If the plug-in has it, the chunk is used. Otherwise, SSME downloads it by HTTP. After the download, SmoothStreamingMediaElement provides an option for the plug-in to persist the downloaded chunk.

A template example for implementation of the cache plug-in ships with Microsoft Expression Encoder 4.

Version Information

Silverlight

Supported in: 5

Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Web.Media.SmoothStreaming Namespace