Document the caching mechanism

This commit is contained in:
Valentin Brandl 2019-04-19 22:57:32 +02:00
parent 9284bceda6
commit 9129d6d171
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

6
doc/caching.md Normal file
View File

@ -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.