Hi Ryan,
It might not be exactly clear in my last email. I think you already know how to use cache in Silverlight; so here is information for using cache system in Silverlight Edtion.
In Silverlight we allow server rendering and displaying the server rendered image on the client; they are connected by class "SilverlightMapConnector" (we have an integrated sample at:\Samples\ServerRendering\SimpleServerRendering.xaml). So in this scenario, we need code for both client and server side.
On the client side, ServerLayerOverlay is the key; it sets some important properties for finding the connector and some other important information (please check the sample for detail). But the bad designing is that we don't have the tile size property on this class, instead we used a hard-coded tile size with 256*256. While in the CustomServerLayerOverlay I sent you yesterday, I expose the tile size property and override the DrawCore method to make it implemented so you can use this overlay instead to change the tile size to 512*512.
On the server side, we have a class with the same name that we used on the client side “ServerLayerOverlay”; it gives the same ability to render actual layers on the server side which should be the same like web or wpf edition. Please check the server code in “default.aspx.cs” in “CSharp HowDoISamples For Debug.Web” project.
Till now, I introduced the client and server ServerLayerOverlay which allows you to render layers cooperatively. So you know, cache is server side thing, we cannot access cache on client side which is un-trust app in browser. So we designed the cache system on the server side. In the sample page “default.aspx.cs”, you will find some ServerLayerOverlay objects; it has a property “ServerCache”; currently we don’t have many settings about this except cache directory. But for more requirements, we think we will make it more common later. Let’s just use the existing properties here. We talked above, the client side collects much information such as connector id, id, tile size etc and during the drawing; each tile creates an URI to access the server side. While the server side gets the request, if the ServerCache is not null, we will create a cache object on the server side and reuse the cache we already have.
Technically, it’s possible to share cache between several controls, but each control has a special reason to have mechanism which is a little different from the other. So I think if we test, there is a chance to make them available to share the caches. Here is a general structure of my idea.
Please feel free to try and let the support team know if you have any questions. I will give a hand to guide them to try our best to make it.
Keep in touch and best regards.
Thanks,
Howard