The source project of this merge request has been removed.
Replace explicit markToIndex cache by a heuristic
The current threshold is two queries without caching, and we cache at the third. That knob might have to be tweaked a bit if some code invalidates often, but still calls markToIndex several times between each invalidation. I think that most current code either invalidates after each call, or never, but I probably overlooked something.