Skip to main content
←API Reference ←com.nianticspatial.nsdk

MeshDownloaderConfig


Declaration​

class MeshDownloaderConfig

Summary​

Configuration structure for the Mesh Downloader session's on-disk cache. Downloaded geometry and textures are cached per graph node, so revisiting a location reads from disk instead of the CDN, and an interrupted download resumes where it stopped rather than starting over. Cached content never goes stale: a re-run of the mapping pipeline publishes new node ids, so an id always names the same geometry. Caching is off by default. A session acquired without it does not read, write, or delete anything in the cache directory, so enabling caching in one run and not the next leaves previously cached data intact.

See also​

  • MeshDownloaderSession.acquire

Constructors​

constructor(cacheEnabled: Boolean = false, cacheMaxMb: Int = 0)

Parameters​

NameTypeSummary
cacheEnabledBoolean
-
cacheMaxMbInt
-

Properties​

NameTypeSummary
cacheEnabledBoolean
If true, downloaded mesh data is cached on disk.
Default: false
cacheMaxMbInt
Maximum disk space the cache may use, in megabytes. Once exceeded, the least-recently-used
nodes are removed until the cache fits.
Must be greater than zero when [cacheEnabled] is true.
Size this above the total download size of the locations you expect to hold. A budget smaller
than the working set does not degrade gracefully -- it evicts nodes that are about to be
needed again, and re-downloads them indefinitely.
Default: 0