Skip to content

search: invalidate repo cache for expressions

Created by: rvantonder

I noticed a lint message that setRepoCacheInvalidation() wasn't being called, somewhere. Indeed! The repo cache was not invalidated when it needed to be.

Previously, for a query like this, there wouldn't be matches, even though there are matches in repo:bar:

(repo:foo or repo:bar) pattern-that-matches-only-in-bar

But, if you changed the order to (repo:bar or repo:foo) pattern-that-matches-only-in-bar, it would find a hit (repo:bar is in the cache).

This PR makes sure to invalidate the repos when needed, and the integration tests that there are non-zero hits for the previous failing case.

Merge request reports

Loading