Skip to content

Smarter cache invalidation

Yorick Peterse requested to merge smarter-cache-invalidation into master

This MR changes the way cache invalidation works so that we only flush caches of certain data types whenever needed. For example, in the past whenever you'd push a commit we'd flush all caches (READMEs, LICENSE files, etc). This MR changes this so that those kind of files only have their cache flushed when the files were changed.

Because ProjectCacheWorker now selectively flushes caches the project wide lease has been removed. Instead this worker only uses a lease to restrict updating of the repository size to once every 15 minutes. This process is quite expensive so it makes sense to restrict this.

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23550

Merge request reports