SuperAPI AI Directory

lovstudio-obsidian-reset-cache

Office & productivity

View repository

Updated 10-16 00:01

About this skill

obsidian-reset-cache — Reset the Obsidian cache

Fix the issue where Obsidian is stuck at "Loading cache..." and cannot start.

When to Use

  • Obsidian gets stuck at "Loading cache..." when starting up
  • The vault has a large number of files, including many non-markdown files (such as node_modules)
  • Suspect the cache is corrupted

Workflow

Step 1: Confirm Obsidian is closed

pgrep -x Obsidian && echo "Obsidian 正在运行,请先关闭" || echo "OK: Obsidian 未运行"

If Obsidian is running, prompt the user to close it first.

Step 2: Clear the IndexedDB cache

rm -rf ~/Library/Application\ Support/obsidian/IndexedDB/

Step 3: Prompt the user to reopen Obsidian

Inform the user:

  1. The cache has been cleared
  2. Reopen Obsidian; the first load will be a bit slower (rebuilding the index)
  3. If the vault contains a large number of non-markdown files such as node_modules, it is recommended to create a .obsidianignore file to exclude them

Optional: Create .obsidianignore

If the user's vault contains node_modules or other directories that should be ignored, help the user create the following in the vault root directory:

node_modules
.git
.output
dist
build

Notes

  • This operation only affects macOS
  • What is cleared is the global cache, which will affect the index of all vaults
  • User data, notes, and plugin configurations will not be deleted