Compartir a través de


Cache Miss_wms_sdk_1

This section discusses how to define and implement a cache proxy policy for content that has not been cached. The following list identifies one possible way that the server and cache proxy plug-in can interact when a client requests digital media that does not reside on the cache server. The actual interaction between a server and plug-in depends on how you implement the plug-in.

  1. The server calls QueryCache on the IWMSCacheProxy interface of the cache proxy plug-in.

  2. Because the content has not been cached, the plug-in calls OnQueryCache on the IWMSCacheProxyCallback interface and passes WMS_CACHE_QUERY_MISS in the Response parameter.

  3. The server then calls QueryCacheMissPolicy on the IWMSCacheProxy interface.

  4. The plug-in can call GetContentInformation on the IWMSCacheProxyServer interface to request that the server connect to the origin and retrieve information about the content.

  5. The server connects to the origin, retrieves content information, and responds to the plug-in by calling OnGetContentInformation on the IWMSCacheProxyServerCallback interface. If the origin server cannot be contacted, or the content is unavailable for any other reason, the cache proxy plug-in can perform protocol rollover by modifying the URL and calling GetContentInformation again.

  6. The plug-in examines the content information sent by the server, chooses a policy, and sends it to the server by calling the OnQueryCacheMissPolicy on the IWMSCacheProxyCallback interface. For example, the plug-in can direct the server to disconnect the client, redirect the client to an alternate URL or proxy, proxy the content as a broadcast, proxy the content on demand, or forward the request to an upstream server. The plug-in can also call DownloadContent on the IWMSCacheProxyServer interface to request that the content be downloaded.

This is illustrated by the following diagram.

Diagram of the implementation of a cache miss policy.

Dd873707.wms8_cacheplugincreate_cache_miss_final(en-us,VS.85).gif

See Also(General)

See Also (Visual Basic .NET)

See Also (C#)

See Also (C++)

  • IWMSCacheProxy::QueryCache

  • IWMSCacheProxy::QueryCacheMissPolicy

  • IWMSCacheProxyCallback::OnQueryCache

  • IWMSCacheProxyCallback::OnQueryCacheMissPolicy

  • IWMSCacheProxyServer::GetContentInformation

  • IWMSCacheProxyServer::DownloadContent

  • IWMSCacheProxyServerCallback::OnGetContentInformation