Skip to content

Expire commit view partial after a day

Why was this MR needed?

See https://gitlab.com/gitlab-org/gitlab-ce/issues/21578. (Which I've probably explained badly.) In short: if a user either changes their email address or adds an additional email address, it might not show in a repository's commits view for up to two weeks, as that's the default cache expiry time. We can't include the state of the users or emails tables in this cache key, because it will be invalidated too quickly on large installs like GitLab.com.

An expiration time of a day seems like a better compromise between performance and accuracy for this view.

In general, we very rarely use explicit caching in views, and for the other cases it looks like the keys will 'naturally' expire as expected, so this view appears to be an edge case.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/21578.

Merge request reports