pub fn try_open_cached(
store_path: &Path,
pbf_path: &Path,
) -> Result<Option<(NodeStore, NodeCacheMeta)>, GeolithError>Expand description
Try to open a cached node store, validating against the current PBF file.
Returns Some(NodeStore) if:
- The node store
.binfile exists - The sidecar
.meta.jsonexists and is valid JSON - The PBF file size and modification time match the cached metadata
Returns None if the cache is stale or missing (caller should rebuild).
§Errors
Returns an error only on I/O failures that aren’t “file not found”.