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.
The server calls QueryCache on the IWMSCacheProxy interface of the cache proxy plug-in.
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.
The server then calls QueryCacheMissPolicy on the IWMSCacheProxy interface.
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.
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.
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.
See Also(General)
See Also (Visual Basic .NET)
IWMSCacheProxy.QueryCacheIWMSCacheProxy.QueryCache (Visual Basic .NET)
IWMSCacheProxy.QueryCacheMissPolicyIWMSCacheProxy.QueryCacheMissPolicy (Visual Basic .NET)
IWMSCacheProxyCallback.OnQueryCacheIWMSCacheProxyCallback.OnQueryCache (Visual Basic .NET)
IWMSCacheProxyCallback.OnQueryCacheMissPolicyIWMSCacheProxyCallback.OnQueryCacheMissPolicy (Visual Basic .NET)
IWMSCacheProxyServer.GetContentInformationIWMSCacheProxyServer.GetContentInformation (Visual Basic .NET)
IWMSCacheProxyServer.DownloadContentIWMSCacheProxyServer.DownloadContent (Visual Basic .NET)
IWMSCacheProxyServerCallback.OnGetContentInformationIWMSCacheProxyServerCallback.OnGetContentInformation (Visual Basic .NET)
See Also (C#)
IWMSCacheProxy.QueryCache IWMSCacheProxy.QueryCache (C#)
IWMSCacheProxy.QueryCacheMissPolicy IWMSCacheProxy.QueryCacheMissPolicy (C#)
IWMSCacheProxyCallback.OnQueryCacheIWMSCacheProxyCallback.OnQueryCache (C#)
IWMSCacheProxyCallback.OnQueryCacheMissPolicyIWMSCacheProxyCallback.OnQueryCacheMissPolicy (C#)
IWMSCacheProxyServer.GetContentInformationIWMSCacheProxyServer.GetContentInformation (C#)
IWMSCacheProxyServer.DownloadContentIWMSCacheProxyServer.DownloadContent (Visual Basic .NET)
IWMSCacheProxyServerCallback.OnGetContentInformationIWMSCacheProxyServerCallback.OnGetContentInformation (C#)
See Also (C++)
IWMSCacheProxy::QueryCache
IWMSCacheProxy::QueryCacheMissPolicy
IWMSCacheProxyCallback::OnQueryCache
IWMSCacheProxyCallback::OnQueryCacheMissPolicy
IWMSCacheProxyServer::GetContentInformation
IWMSCacheProxyServer::DownloadContent
IWMSCacheProxyServerCallback::OnGetContentInformation