|     Documentation    |     Premium Support

Need guidance about creation and implementation of cache tiles

can you please guide me how to create and use cache tiles in mvc because i have seen the given example of win forms but i’m unable to understand that how can i use it in mvc or how does it work.

Hi M_Saeed_Chamman,

For MVC the cache is set in Overlay, it include ClientCache and ServerCache.

ServerCache just works like other product, it will generate cached tile image in target folder, and improve the performance in server side.

ClientCache is work related with Browser, you just need to set the expired time.

You can just use them like this:

LayerOverlay layerOverlay = new LayerOverlay();            
        layerOverlay.ClientCache = new ClientCache(new System.TimeSpan(0, 20, 0));
        layerOverlay.ServerCache = new ServerCache(Request.MapPath("~/CacheMVC"));
        layerOverlay.ServerCache.CacheId = "Test";

Wish that’s helpful.