Module: Namespaces::Traversal::Cached
Instance Method Summary
collapse
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Instance Method Details
#all_project_ids ⇒ Object
28
29
30
31
32
33
34
35
36
|
# File 'app/models/namespaces/traversal/cached.rb', line 28
def all_project_ids
return super unless attempt_to_use_cached_data?
scope_with_cached_ids(
all_projects.select(:id),
Project,
Namespaces::Descendants.arel_table[:all_project_ids]
)
end
|
#self_and_descendant_ids(skope: self.class) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'app/models/namespaces/traversal/cached.rb', line 14
def self_and_descendant_ids(skope: self.class)
return super unless skope == self.class
return super unless attempt_to_use_cached_data?
scope_with_cached_ids(
super,
skope,
Namespaces::Descendants.arel_table[:self_and_descendant_group_ids]
)
end
|