Cache Miss
Previous | Next |
Cache Miss
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.
See Also(General)
See Also (Visual Basic .NET)
- IWMSCacheProxy.QueryCache (Visual Basic .NET)
- IWMSCacheProxy.QueryCacheMissPolicy (Visual Basic .NET)
- IWMSCacheProxyCallback.OnQueryCache (Visual Basic .NET)
- IWMSCacheProxyCallback.OnQueryCacheMissPolicy (Visual Basic .NET)
- IWMSCacheProxyServer.GetContentInformation (Visual Basic .NET)
- IWMSCacheProxyServer.DownloadContent (Visual Basic .NET)
- IWMSCacheProxyServerCallback.OnGetContentInformation (Visual Basic .NET)
See Also (C#)
- IWMSCacheProxy.QueryCache (C#)
- IWMSCacheProxy.QueryCacheMissPolicy (C#)
- IWMSCacheProxyCallback.OnQueryCache (C#)
- IWMSCacheProxyCallback.OnQueryCacheMissPolicy (C#)
- IWMSCacheProxyServer.GetContentInformation (C#)
- IWMSCacheProxyServer.DownloadContent (Visual Basic .NET)
- IWMSCacheProxyServerCallback.OnGetContentInformation (C#)
See Also (C++)
- IWMSCacheProxy::QueryCache
- IWMSCacheProxy::QueryCacheMissPolicy
- IWMSCacheProxyCallback::OnQueryCache
- IWMSCacheProxyCallback::OnQueryCacheMissPolicy
- IWMSCacheProxyServer::GetContentInformation
- IWMSCacheProxyServer::DownloadContent
- IWMSCacheProxyServerCallback::OnGetContentInformation
Previous | Next |