Commit Graph

4 Commits

Author SHA1 Message Date
GitLab Bot 784fae4b9d Add latest changes from gitlab-org/gitlab@master 2019-12-12 12:07:33 +00:00
Luke Duncalfe a0b14c40dc CE-specific changes for designs `user_notes_count`
Notes call `#after_note_created` and `#after_note_destroyed` on their
noteable in callbacks, so the noteable can perform tasks particular to
them, like cache expiry.

This is in preparation of the EE-specific class
`DesignManagement::Design` clearing its `user_notes_count` cache when
its note are created or destroyed.

Refactoring Rspec behaviour testing of a counter caching service into a
shared example.

https://gitlab.com/gitlab-org/gitlab-ee/issues/13353
2019-08-27 20:50:26 +00:00
Brett Walker bcbe5672ec small change to make less conflict with EE version 2017-12-11 16:45:06 +00:00
Yorick Peterse 3e561736b2
Cache the number of user SSH keys
By caching the number of personal SSH keys we reduce the number of
queries necessary on pages such as ProjectsController#show (which can
end up querying this data multiple times).

The cache is refreshed/flushed whenever an SSH key is added, removed, or
when a user is removed.
2017-11-16 14:59:38 +01:00