]> arthur.barton.de Git - bup.git/commit
vfs: improve cache behaviour
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 15 Mar 2020 21:38:15 +0000 (22:38 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 30 May 2021 16:55:07 +0000 (11:55 -0500)
commit2fa6ddcd2ee6843f80718010f066be50a252a925
tree06a329c5e73dee9d3e9e5455eb8f5332cd00a93a
parent585ab5e3ba050fd068a953230958886c4ef63154
vfs: improve cache behaviour

If _commit_item_from_oid() is called first with require_meta=False,
and then again with require_meta=True, the second and further calls
will not use the cache, as the cached entry is without metadata.
Improve this by overwriting the cache entry if it couldn't be used.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/vfs.py