From 9129d6d1713761487dfd2400d1e87be10e4b900f Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Fri, 19 Apr 2019 22:57:32 +0200 Subject: [PATCH] Document the caching mechanism --- doc/caching.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/caching.md diff --git a/doc/caching.md b/doc/caching.md new file mode 100644 index 0000000..4808e49 --- /dev/null +++ b/doc/caching.md @@ -0,0 +1,6 @@ +# Caching + +To prevent calculating the whole stats each time, the `HEAD` and HoC is cached, once it was calculated. If a cached +version is found, current `HEAD` and cached `HEAD` are compared, if they are the same, the cached value is returned, +else only the HoC between the cached `HEAD` and the current `HEAD` is calculated, added to the cached score and the +cache gets updated.