Skip to content

BlockCache

Official

The cache of the block in the note.

markdown foo ^bar

Import:

import type { BlockCache } from 'obsidian';

Signature:

export interface BlockCache extends CacheItem

Extends: CacheItem

Properties

PropertyTypeDescription
appAppReference to the obsidian#App.
cacheunknownInternal cache data for block references.
idstringThe ID of the block.
positionPosPosition of this item in the note.
(Inherited from CacheItem)

Methods

MethodReturnsDescription
clear()voidClears the block cache.
getAll(cancelContext)AsyncGenerator<unknown>Iterates the block cache for every markdown file in the vault.
getForFile(cancelContext, file)Promise<unknown>Gets the block cache for a file, reading and caching it if needed.

Links to this page: