Skip to content

Commit

Permalink
Experiment with etags on project page
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Sep 12, 2016
1 parent 78e5460 commit 6d35444
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class ProjectsController < ApplicationController
before_action :ensure_logged_in, only: [:your_dependent_repos, :mute, :unmute]
etag { current_user.try :id }

def index
if current_user
Expand Down Expand Up @@ -84,6 +85,7 @@ def show
end
end
find_version
fresh_when([@project, @version])
@dependencies = (@versions.size > 0 ? (@version || @versions.first).dependencies.includes(project: :versions).order('project_name ASC').limit(100) : [])
@contributors = @project.contributors.order('count DESC').visible.limit(20)
end
Expand Down

0 comments on commit 6d35444

Please sign in to comment.