Skip to content

Commit cdee65a

Browse files
committed
OTWO-7667 Cache changes in people page
1 parent bfe6cb1 commit cdee65a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/controllers/people_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def rankings; end
1212
private
1313

1414
def query_or_cache_exist
15-
params[:query].blank? && Rails.cache.exist?('people_index_page') && Rails.cache.exist?('people_index_page_device')
15+
key = only_device? ? 'people_index_page_device' : 'people_index_page'
16+
params[:query].blank? && Rails.cache.exist?(key)
1617
end
1718

1819
def find_index_people

0 commit comments

Comments
 (0)