chipsenkbeil / vimwiki-rs

Rust library and tooling to parse, render, and modify vimwiki text and files.
56 stars 2 forks source link

Flesh out caching strategy for vimwiki-cli & vimwiki-server #116

Closed chipsenkbeil closed 3 years ago

chipsenkbeil commented 3 years ago

Today, vimwiki-server caches all data in a single file, which is expensive to rewrite and load. vimwiki-cli has no caching.

It would be nice to provide the same strategy for both by using a SHA1 for the file name based on its content and an index.json that exists to map a path to a sha1 digest. All of these parsed files and the index can be stored in the caching directory.

This means more files being opened and closed, but it also means smaller reads if only a few files need to be loaded from cache.