Rewrite the Directory Layer Cache implementation to use value-checks #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I tried using the
\xff/metadataVersion
key to implement caching in the directory layer but the experiment showed the following drawbacks:Using the new Deferred Value Checks features (cf #103) we can use another approach to handle caching:
/Foo/Bar/Baz
keeps the list of the k/v that were used to resolveFoo
, thenBar
, thenBaz
).not_committed
error induce a retry.For the moment, we use a single tag for all the value-checks performed by the DL, so we are still discarding the whole cache even if a single subspace is changed. We may in the future be more precise?
Since we are not relying on additional keys anymore, this means that this implementation is compatible with the existing v1.0 format of the DL, and can also co-exist with scripts and programs using other bindings!