I use VeraCrypt to Encrypt my vault so that I have to type in a security PIN to view/edit my notes each time I use Obsidian. This is to keep my notes private on a shared machine.
I use keyboard shortcuts to quickly mount the volume containing my vault (unlock the vault) and to unmount the volume (lock the vault). I also have it set to unmount after 5mins of inactivity.
The problem I’m having is that when the volume is unmounted, although I can’t open any notes as expected, the search results still show some of the contents of my notes. e.g. even when my vault is fully encrypted searching “password” would bring up results in the search pane. (Presumably this is from the cache file?)
Are there any work arounds for this (other than closing Obsidian each time I want to lock my vault)? Perhaps moving the cache file inside my encrypted volume? Or disabling the cache somehow?
Just for context, Obsidian remembers some of your last accessed files so when you perform searches, we don’t have to repeatedly load every file from your hard drive (which would be slow). This is what you’re seeing from search.
If you’re encrypting your vault, then you should probably close the app to avoid someone accessing your vault data that’s in memory.