Description
While working on the annotation cache, I noticed a fair bit of confusion/deficiency in the code when handling history related tunables. Specifically, there are 2 problems:
- confusion between general history and history cache
- lack of per-project/repository override
For the former, there are pieces of code exhibiting confusion what is historyEnabled
and useHistoryCache
. Plus related naming problems - Configuration
using historyCache
boolean while RuntimeEnvironment
wrapping that as useHistoryCache()
. When fixing that, one would need to tread lightly because this tunable is serialized into configuration.xml
.
The history -> history cache dependency should be maintained.
For the latter, the global setting is often checked before descending into code that performs per-repository tunable checks such as
opengrok/opengrok-web/src/main/webapp/minisearch.jspf
Lines 38 to 41 in 05f9a7f
It should be possible to have history disabled on the global level while overriding it on per-project/repository level. This sort of global bracketing prevents that.