Releases: czhhbp/obsidian-on-demand-cache
Release list
1.0.9
Fixed the cache-folder documentation and made .cache the default.
What's changed
- Default cache folder is now
.cache: the default was previouslycache. Both work equally well;.cachekeeps the cached files tidily hidden inside your vault. - Corrected a documentation error: earlier docs stated the cache folder must be a non-hidden directory because Obsidian does not index hidden folders. This was wrong.
FileSystemAdapter.getResourcePathencodes the absolute file path directly into anapp://resource-proxy URL, which Obsidian's renderer resolves by reading from disk — it does not depend on the vault's file index. Hidden folders such as.cachetherefore render images correctly (verified on desktop, including after clearing Obsidian's HTTP cache and going offline). - Updated the README (English and Chinese) to reflect the corrected behavior and the new default.
Notes
- No changes to caching behavior, link handling, filters, or commands.
- Existing users keep whatever cache folder they have configured; only the default (used for fresh installs and when the field is cleared) changed.
- Requires Obsidian 1.8.7 or later (unchanged).
This is a documentation/behavior-default fix. Upgrading is recommended.
1.0.8
Widened the "File extensions" input so the full list is always visible.
What's changed
- Longer "File extensions" input: the text area now stretches to the full width of the settings pane and enforces a minimum width, so the entire comma-separated extension list fits on one line without truncation or awkward wrapping.
- The input stays below its label/description, remains taller by default, is vertically resizable, and uses a monospace font for easier reading and editing.
Notes
- No changes to caching behavior, filters, or commands.
- Requires Obsidian 1.8.7 or later (unchanged).
This is a UI/UX polish release. Upgrading is recommended.
1.0.7
Improved the "File extensions" setting layout.
What's changed
- File extensions input moved below its label: the input now sits under the setting name/description and spans the full width of the settings pane, so the entire extension list is visible at a glance.
- The text area is taller by default, vertically resizable, and uses a monospace font.
Notes
- No changes to caching behavior, filters, or commands.
- Requires Obsidian 1.8.7 or later (unchanged).
1.0.6
Fixed Obsidian review errors and aligned the version number.
What's changed
- Moved injected styles to
styles.css: the plugin previously created a<style>element at runtime, which Obsidian's review flags as an error and a warning. All plugin styling now lives in the standardstyles.cssfile that Obsidian loads automatically. This resolves:- Error:
Creating and attaching "style" elements is not allowed. - Warning:
Uses document.createElement instead of Obsidian's createEl helpers.
- Error:
- Version alignment: the manifest version now matches the release tag.
Notes
- No changes to caching behavior, filters, or commands.
- The file extensions input remains full-width, and clearing the cache still requires confirmation.
- Requires Obsidian 1.8.7 or later (unchanged).
1.0.4
Hardened plugin startup for cross-platform (mobile) compatibility.
What's changed
- Fixed a potential startup error on mobile: the diagnostic startup log evaluated
adapter instanceof FileSystemAdapterunconditionally. SinceFileSystemAdapteris a desktop-only class, this could throw aTypeErroron iOS/Android if the class is unavailable at runtime. The check is now defensive — it verifies the class exists before usinginstanceof, so startup is safe on all platforms (Windows, macOS, Linux, iOS, Android). - Updated documentation: the README installation section now reflects that the plugin is officially available in the Obsidian community plugin store, with manual installation kept as a fallback.
Notes
- No changes to caching behavior, settings, or commands.
- Requires Obsidian 1.8.7 or later (unchanged).
This is a maintenance release. If you are on 1.0.3, upgrading is recommended but not urgent.
1.0.3
1.0.2
Fixed Obsidian review errors:
- Raised minAppVersion to 1.8.7 to support getLanguage().
- Replaced direct style assignment with setCssStyles().
- Replaced instanceof HTMLElement with node.instanceOf(HTMLElement).
- Added type assertions to eliminate unsafe assignments.
1.0.1
Fixed Obsidian review errors:
- Raised minAppVersion to 1.8.7 to support getLanguage().
- Replaced direct style assignment with setCssStyles().
- Replaced instanceof HTMLElement with node.instanceOf(HTMLElement).
- Added type assertions to eliminate unsafe assignments.
1.0.0
On-Demand Cache v1.0.0
Initial release.
What it does
On-Demand Cache downloads remote attachments (images, videos, audio, documents) only when you open a note, then transparently serves the local copy instead of the network file — while keeping your original links unchanged.
Key advantages
- Your notes stay untouched: Unlike "download & replace" plugins, this plugin never rewrites your links. The original
https://...URLs remain in your notes, so syncing only syncs link text, never large files. - On-demand, not bulk: Attachments are cached only when you open a note. No proactive mass downloading.
- True offline access: Once cached, images and media display from the local cache even when you're offline.
- Auto-fill across devices: Open a note on another device and missing attachments are downloaded automatically.
- Content-hash deduplication: Identical files are stored only once, saving disk space.
- Automatic cleanup: Unreferenced cache files are removed on startup.
- Bilingual UI: English and Chinese, switching automatically with Obsidian's language.
Supported link formats
- Markdown image:
 - Markdown link:
[text](https://...) - Obsidian wiki link:
![[https://...]],[[https://...]],[[https://...|alias]] - HTML tags:
<img>,<audio>,<video>,<source> - Bare URL:
https://...
Getting started
Note: This plugin is currently under review in the Obsidian community directory and is not yet installable from within Obsidian. Please use the manual installation below.
Manual installation:
- In your vault, create the folder
.obsidian/plugins/on-demand-cache/(create any missing parent folders). - Download
main.jsandmanifest.jsonfrom this release and place both files into that folder. - Open Obsidian → Settings → Community plugins → Installed plugins.
- Find "On-Demand Cache" and toggle it on.
After enabling:
- Open any note containing remote attachments — they are cached automatically.
- To hide the
cache/folder from your file list, exclude it in your sync tool (e.g. addcache/to.gitignorefor Git).
Note: Caching is triggered only when a note is opened. Attachments inserted while editing are cached the next time you reopen the note.