notes: add caching mechanism
notes: add caching mechanism

Showing last modification time in human-readable relative form is
useful. However, the latency caused by generating all the data and
formatting it was noticable when run from within vim.

So I added a cache file to store the data between file changes. I
couldn't simply cache the formatted string output because the relative
time would go stale in the cache. Therefore, we serialise the python
data containing UNIX timestamps.

As long as the git hash matches the hash stored in the cache, we read in
the data and format it (including generating relative time) on each
invocation. We avoid the cost of opening all files, parsing the YAML
front-matter, and getting modification times from git.

mjwestcott/dotfiles,mjwestcott/dotfiles,mjwestcott/dotfiles