Skip to main content

CacheOptions Class

Contains settings that define parameters of a local cache to store image tiles.

Namespace: DevExpress.Xpf.Map

Assembly: DevExpress.Xpf.Map.v23.2.dll

NuGet Package: DevExpress.Wpf.Map


public class CacheOptions :

The following members return CacheOptions objects:


The local cache stores map tiles loaded from the GIS data provider. So, when you navigate to the same geographical locations, the map tiles are loaded from your local directory, saving your internet resources.

A local cache is represented by the CacheOptions object and can be accessed via the MapControl.CacheOptions property.

To customize the local cache, specify the directory (CacheOptions.Directory) and the time interval after which the loaded map tiles should be updated (CacheOptions.KeepInterval).


This example illustrates what actions should be executed to customize the local cache of a map control.

The local cache allows you to save internet resources and significantly increases map performance by loading saved map tiles from the local directory.

To enable the map cache, it is necessary to assign the MapControl.CacheOptions property to the CacheOptions object and specify the directory to which the loaded map tiles will be saved using the CacheOptions.Directory property. It is also necessary to specify the time interval after which map tile images will be updated from a map data provider via the CacheOptions.KeepInterval property.

In this example tile images of a map are loaded from the resource.

<Window x:Class="MapCacheOptions.MainWindow"
        Title="MainWindow" Height="350" Width="525" >
                <dxm:CacheOptions Directory="C://MapTiles" KeepInterval="01:00:00"/>
            <dxm:ImageTilesLayer >
                    <dxm:OpenStreetMapDataProvider Kind="Road" />
See Also