mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Don't cache only on user
The user itself doesn't update when a new attribute help text or role is added to them
This commit is contained in:
@@ -30,7 +30,9 @@ class AttributeHelpText < ApplicationRecord
|
||||
acts_as_attachable viewable_by_all_users: true
|
||||
|
||||
def self.cached(user)
|
||||
OpenProject::Cache.fetch([name, user]) { visible(user).select(:id, :attribute_name).index_by(&:attribute_name) }
|
||||
RequestStore.fetch(name) do
|
||||
visible(user).select(:id, :attribute_name).index_by(&:attribute_name)
|
||||
end
|
||||
end
|
||||
|
||||
def self.for(model)
|
||||
|
||||
Reference in New Issue
Block a user