Commit 15ea1285 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'bugfix/star_cache' into 'master'

Touch project when toggling stars to update cache

This is a fix for gitlab-org/gitlab-ce#3513.

When a star toggle event happens, we touch project to clear cache key.
This will trigger a new "updated_at" at the project model. If it's undesirable, please let me know and I will try to solve it in a different way.

See merge request !1970
parents 76f00542 82e916b0
......@@ -10,7 +10,7 @@
#
class UsersStarProject < ActiveRecord::Base
belongs_to :project, counter_cache: :star_count
belongs_to :project, counter_cache: :star_count, touch: true
belongs_to :user
validates :user, presence: true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment