Skip to content

Commit

Permalink
members-block: comment broken cache
Browse files Browse the repository at this point in the history
  • Loading branch information
brauliobo committed May 16, 2015
1 parent f31648d commit 82c8dd4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/controllers/public/profile_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def friends
end

def members
if is_cache_expired?(profile.members_cache_key(params))
#if is_cache_expired?(profile.members_cache_key(params))
@members = profile.members_by_name.includes(relations_to_include).paginate(:per_page => members_per_page, :page => params[:npage], :total_entries => profile.members.count)
end
#end
end

def fans
Expand Down
4 changes: 2 additions & 2 deletions app/views/profile/members.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1><%= _("%s's members") % profile.name %></h1>

<% cache_timeout(profile.members_cache_key(params), 4.hours) do %>
<%# cache_timeout(profile.members_cache_key(params), 4.hours) do %>
<ul class='profile-list'>
<% @members.each do |member| %>
<%= profile_image_link(member) %>
Expand All @@ -12,7 +12,7 @@
<div id='pagination-profiles'>
<%= pagination_links @members, :param_name => 'npage' %>
</div>
<% end %>
<%# end %>
<% button_bar do %>
<%= button :back, _('Go back'), { :controller => 'profile' } %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class PeopleBlockPluginProfileController < ProfileController
append_view_path File.join(File.dirname(__FILE__) + '/../views')

def members
if is_cache_expired?(profile.members_cache_key(params))
#if is_cache_expired?(profile.members_cache_key(params))
unless params[:role_key].blank?
role = Role.find_by_key_and_environment_id(params[:role_key], profile.environment)
@members = profile.members.with_role(role.id)
Expand All @@ -13,7 +13,7 @@ def members
@members_title = 'members'
end
@members = @members.includes(relations_to_include).paginate(:per_page => members_per_page, :page => params[:npage], :total_entries => @members.count)
end
#end
render "profile/members"
end

Expand Down

0 comments on commit 82c8dd4

Please sign in to comment.