getCacheSafe
Retrieves the cached metadata for a given file or path.
Import:
import { getCacheSafe } from 'obsidian-dev-utils/obsidian/metadata-cache';Signature:
function getCacheSafe(app: App, fileOrPath: PathOrFile, options: ParseCacheOptions): Promise<CachedMetadataEx | null>Parameters:
| Parameter | Type | Description |
|---|---|---|
app | App | The Obsidian app instance. |
fileOrPath | PathOrFile | The file or path to retrieve the metadata for. |
options | ParseCacheOptions | The parse options controlling which additional links to parse. |
Returns: Promise<CachedMetadataEx | null> — The cached metadata for the file, or null if it doesn’t exist.
Links to this page: