Advanced Metadata Cache

approvedunreviewed

by Michael Naumov

Maintains the vault indexes that are otherwise rebuilt on every call, and answers the built-in lookups from them, so backlinks come from an index instead of a fresh scan of every note.

★ 4 stars↓ 4,710 downloadsUpdated 18d agoMIT

Advanced Metadata Cache

Buy Me a Coffee GitHub release Obsidian downloads Minimum Obsidian version Coverage: 100%

Some of the questions Obsidian answers about a vault have no index behind them. Asking which notes link to this one means scanning every note, on every call — the Backlinks pane pays that cost, and so does every plugin that asks the same question. Asking what every note is called means the same walk, and the [[ autocomplete pays it every single time you open it. On a large vault it is slow enough to be felt.

This plugin maintains the indexes those questions deserve and answers from them instead. It does so by replacing the method that already asks the question, so nothing has to know the plugin is installed: the Backlinks pane gets faster, and so does anything else that asks.

Each index is a module that is switched on or off on its own, so a vault only pays for the ones it uses. On a small vault you will not notice any of them; that is the point at which you do not need this.

The Backlinks module: all 120 backlinks in a big vault

More screenshots
Answered from an index, not a scan of every note The same answer as Obsidian, arrived at faster Every index is a module, switched on by itself The Backlinks module: every backlink, in one list Answered from an index, not a scan of every note The same answer as Obsidian, arrived at faster The same modules, on the phone

Demo vault

The documentation is an interactive demo vault. Every feature has a note that explains what it does and why you would want it, with buttons that measure the difference for real.

Start reading here — it is plain markdown, so it works on GitHub with nothing installed.

A copy of the vault ships with every release. You can access it via any of the following:

  1. Running the Advanced Metadata Cache: Open demo vault command, on desktop. The command is not available on mobile, so use the next option there.
  2. Downloading advanced-metadata-cache-demo-vault.zip from the Releases. It unzips into a single advanced-metadata-cache-demo-vault-<version> folder.
  3. Browsing its source in demo-vault/ in this repository.

What it does

  • A backlink index that keeps itself current, so the Backlinks pane and every plugin that asks for backlinks stop rescanning the vault. 01 Backlink cache
  • Three ways to ask — fast from the cache, safe after pending changes settle, or the original built-in implementation for comparison — and one more Obsidian has no call for: which notes link to a note that does not exist yet. 02 Fast, safe, and original backlinks
  • Canvas files are indexed too, and so are frontmatter markdown links when Frontmatter Markdown Links is installed. 03 Canvas backlinks
  • A name index behind the [[ autocomplete, so opening it stops rescanning every note in the vault for its name and aliases. 05 Name index
  • A frontmatter property can name a note too, found under its title, Quick switcher included, and, if you ask, offered under it by the [[ autocomplete. Name patterns build a person's other names from lastName and firstName, once per language, so none has to be stored as an alias. 06 Titles
  • When each heading was created, modified and seen, recorded per heading without touching the note, so other plugins can sort a note's headings by time. 07 Heading times
  • Notes by frontmatter property value, dates kept in order, for other plugins to ask without scanning the vault, answered from disk at startup. 08 Property index
  • Unlinked mentions without reading every note, so the Backlinks pane's Unlinked mentions section reads only the notes that mention the note, and lists exactly what it listed before. 09 Unlinked mentions
  • A file answers to the texts links show for it, so [alpha](bravo.md) lets other plugins find bravo.md as alpha, and ![[scan-0042.pdf|March invoice]] lets them find an attachment as March invoice. 10 Link texts
  • Links inside code blocks that are really notes, such as an ad-note admonition, count like any other link once you list the block's language: in backlinks, outgoing links, the graph and rename updates. 11 Code block links
  • Which notes carry a tag, in their text or in their tags property, so other plugins find the notes tagged #project, nested tags included, without reading every note's cache. 12 Tags
  • Which notes link to a website, so other plugins can show a site's backlinks, suggest URLs the vault already uses and flag a host that looks like a typo, from every http or https link, bare, in a markdown link or in a property. 13 External links
  • Shared HTML source ranges and sanitizer checks let other plugins inspect markup without repeatedly parsing the vault. 15 HTML
  • Properties for one heading or block, written in an advanced-metadata-cache code block right under it, the way frontmatter is written for the note, so other plugins can read them and find every block marked status: open across the vault. Reading view and Live Preview show the block as a compact panel, folded to one line. 16 Block metadata
  • Metadata from other file types, such as Markdown links in .mdx or .fountain, reaches core backlinks, graph link resolution and Bases property reads; plugins can register their own parsers. 14 Non-Markdown
  • Every index is a module of its own, switched on or off without touching the others; Backlinks, Properties, Link texts, Code block links and Non-Markdown are on by default. The last two read nothing until configured or registered by a plugin. A module switched off unloads completely. 04 Settings

Derived caches stay on each device; heading history and registered property names sync through ordinary vault files. See Storage and sync.

See also

My other Obsidian resources

PluginFeaturesHow Advanced Metadata Cache differs
Backlink Cache (my plugin)Retired; points to its successor, which now carries the backlink indexSupersedes Backlink Cache: includes its backlink index; adds: names, titles, headings, properties, unlinked mentions, link texts, tags, external links and more
Boost Link SuggestionsAlternative wikilink suggester; link-count and manual-boost orderingSame suggestion goal; keeps core suggester/order; indexed lookup instead of vault walks
DatacoreReactive indexed query engine; JavaScript and JSX viewsDifferent integration: accelerates core calls and their consumers; no query language
DataviewPage/inline-field indexes; query language and JavaScript tables/lists/tasksDifferent integration: core calls and startup-loaded property lookups; no query language
External Link AutocompleteOwn index of external links; suggests used links while typing; link browser and vault-wide link edit; data for scriptsDifferent integration: external-link index as a plugin API for other plugins; no suggester or views
Front Matter TitleFrontmatter titles in explorer, tabs and graphComplementary title lookup: finds notes by title; offers titles in autocomplete; no display changes
Indexed Search (my plugin)Trigram index behind core Search; same results, faster on large vaultsSame approach for different core lookups: metadata calls, not full-text search
Vault MapJSON Lines export of frontmatter, links, embeds and backlinksAlternative index access: in-memory core calls and plugin API; no export file

Last searched for similar plugins on 2026-11-22.

For plugin developers

This plugin makes two core calls faster for every plugin that makes them, and publishes an API, declared in api.d.ts, for what core has no call for. The member-by-member reference is docs/api.md.

app.metadataCache.getBacklinksForFile(file) (the Backlinks module) and app.metadataCache.getLinkSuggestions() (the Names module) keep Obsidian's own signature and answer what Obsidian would, so there is nothing to do to use them.

Everything else (the safe, original and reverse-lookup variants of those two calls, titles, heading times, notes by property value or date, unlinked mentions, link texts, notes by tag, external links, HTML candidates and diagnostics, and the code block languages whose links count) is AdvancedMetadataCacheApi:

import { watchPluginApi } from '@mnaoumov/obsidian-lib/plugin/plugin-api';

import type { AdvancedMetadataCacheApi } from './api.d.ts';

import { ADVANCED_METADATA_CACHE_API_CONTRACT } from './api-contract.ts';

const apiRef = watchPluginApi<AdvancedMetadataCacheApi>({
  apiVersionRange: '^1.3',
  app: this.app,
  component: this,
  contract: ADVANCED_METADATA_CACHE_API_CONTRACT,
  pluginId: 'advanced-metadata-cache'
});

// `value` is always current and never stale: `null` while this plugin is not loaded, and non-`null`
// on its own once it is.
const api = apiRef.value;
if (api) {
  console.log(api.getTitles('Notes/Some note.md')); // ['The Real Name']
}

The handle comes from the @mnaoumov/obsidian-lib plugin registry; Cross-plugin APIs covers watchPluginApi and the registry from the library's side. The contract version moves independently of the plugin's own, so ask for a range, and ask for the lowest version that has every member you call; the reference says which version each one arrived in.

If you would rather not depend on @mnaoumov/obsidian-lib for the handle, the registry is a documented wire protocol you can read directly — see Plugin API protocol.

Installation

The plugin is available in the official Community Plugins repository.

Beta versions

To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:

  1. Ensure you have the BRAT plugin installed and enabled.
  2. Click Install via BRAT.
  3. An Obsidian pop-up window should appear. In the window, click the Add plugin button once and wait a few seconds for the plugin to install.

Debugging

By default, debug messages for this plugin (id: advanced-metadata-cache) are hidden.

If you need to enable them refer to the documentation.

Changelog

All notable changes to this project will be documented in the CHANGELOG.

Contributing

Contributions are welcome — see CONTRIBUTING to get set up.

Support

Buy Me A Coffee

Filing an issue (for AI agents and humans)

Open issues through the issue forms, not as blank issues.

To report a bug from inside Obsidian, run the Advanced Metadata Cache: Report a bug command. It opens the bug form with the plugin version, the Obsidian version and your operating system already filled in.

Filing from the CLI or the API (gh issue create --body, or an AI agent filing for you) skips the form, and gh issue create --template cannot load an issue form. In that case, open the matching form in .github/ISSUE_TEMPLATE/, copy every field as a ### <label> heading in the form's order, and fill in each one. Always state the plugin version, the Obsidian version and your operating system.

License

© Michael Naumov

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.