Storage types

In OCMAM, map data is stored in an online mutable or protected cache.

The following diagram shows a high-level overview of the OCMAM components.

Figure 1. High-level component view

In the online mutable cache, you can set the maximum storage size and enable the eviction policy. If data reaches the maximum allowed size, it is evicted based on the least-recently-used (LRU) policy. For more information on the eviction configuration, see "Protect tiles from eviction" and "Allow eviction of tiles" in Offline mode.

If you want to use some map regions with all the related data offline and keep a consistent view of them, you can save the catalog that contains these regions to the protected cache.

The protected cache needs to contain the full view of a region at all levels to allow offline usage. If you want to add the same data version to the protected and mutable caches, to omit duplicates and reduce traffic usage, first download regions to the protected cache and only then to the mutable cache. Otherwise, downloaded bundles are duplicated in both caches. For more information on how to work with data in the mutable and protected caches, see Manage data in mutable cache and Manage data in protected cache.

In the table below, find the features that the online mutable and protected cache support.

Feature Protected cache Online mutable cache
Map consistency Yes
Prefetched regions are protected from eviction. Therefore, this storage provides a consistent view at all tile levels.
Only prefetched regions have a consistent view.
Update ways Storage media, online Online
Streamable No Yes
Data can be updated incrementally.
Max storage size is configurable No Yes
The default value is 32 MB. Data that exceeds the maximum size is evicted.
Map region support Yes
This storage type saves entire regions with all related data.
Update based on bounding box No Yes

Set up the HERE Data SDK for C++ cache

To set up the SDK cache, use the cache_settings field of the DataStoreServerSettings structure.


olp::clientmap::datastore::DataStoreServerSettings server_settings;
server_settings.cache_settings.disk_path_mutable = "path/to/disk/mutable/cache";
    = "path/to/disk/mutable/cache";
server_settings.cache_settings.max_disk_storage = 1024ull * 1024ull * 64ull;
server_settings.cache_settings.max_memory_cache_size = 1024u * 1024u * 2ull;

In the above example, the following parameters are used:

  • disk_path_mutable – the path to the disk mutable cache. This cache is updated when new bundles are downloaded from the HERE platform.
  • disk_path_protected – the path to the disk protected cache. This cache is not updated when new bundles are downloaded from the HERE platform.
  • max_disk_storage – the maximum size of the disk space (in bytes) that is used for persistent stores. The default size is 32 MB.
  • max_memory_cache_size – the maximum size (in bytes) of the memory data cache. The default size is 1 MB.

Check if encoded tile data is in the disk cache

To check if encoded map data for a given tile is in the disk mutable or protected cache, use the IsCached method of the DataStoreClient class.


const auto is_cached = client.IsCached(
    olp::clientmap::datastore::TileRequest( )
        .WithTileKey( tile_key )
        .WithLayerGroup( clientmap::layergroup::kRendering ) );

In the example above, the following objects and parameters are used:

  • client – the previously created DataStoreClient instance.
  • catalog_handle – the handle of the catalog for which you want to check the tile data.
  • tile_key – the key of the tile for which you want to check the tile data.
  • kRendering – the name of the layer group for which you want to check the tile data.

results matching ""

    No results matching ""