Class SDKCache

java.lang.Object
com.here.NativeBase
com.here.sdk.maploader.SDKCache

public final class SDKCache extends NativeBase

A class to manage SDK Cache. Path for SDKCache is specified via SDKOptions.cachePath. SDKCache manages temporary downloaded map data during map interaction and follows LRU (least recently used) strategy to delete map data when cache size exceeds the specified SDKOptions.cacheSizeInBytes.

  • Method Details

    • fromEngine

      @NonNull public static SDKCache fromEngine(@NonNull SDKNativeEngine sdkEngine)

      Gets a single instance of this class per provided SDKNativeEngine.

      Parameters:
      sdkEngine -

      Instance of an existing SDKEngine.

      Returns:

      SDKCache instance for this engine.

    • clearCache

      public void clearCache(@NonNull SDKCacheCallback callback)

      Clears all data that is currently stored in the SDK cache. Path for cache is specified by SDKOptions.cachePath. The operation can have unexpected behaviour when it is called during a map interaction, during turn-by-turn navigation (only available for the Navigate license) or during ongoing requests initiated by the OfflineSearchEngine or the OfflineRouteEngine (only available for the Navigate license).

      Parameters:
      callback -

      Callback which receives the result on the main thread.