Implement some form of caching
vbrandl opened this issue · comments
A simple form of caching might look like this:
When calculating the HoC, store the current commit ref OLD_HEAD
and the HoC score somewhere. Once a new request is made, perform a pull operation, compare OLD_HEAD
against the current HEAD
. If they are the same, return the cached value, if not, calculate the HoC score between OLD_HEAD
and the current HEAD
, add the previously cached value and store the new result in the cache.