From e1d5d1fdd379824b7890d4b24ae19769c142f72d Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Tue, 11 Jun 2013 14:59:26 -0700 Subject: Cache a user's profile photo rather than repulling it each time. --- app/controllers/user_controller.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/controllers/user_controller.rb') diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index b7912b528..e21315eb6 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -532,6 +532,7 @@ class UserController < ApplicationController # actual profile photo of a user def get_profile_photo + long_cache @display_user = User.find(:first, :conditions => [ "url_name = ? and email_confirmed = ?", params[:url_name], true ]) if !@display_user raise ActiveRecord::RecordNotFound.new("user not found, url_name=" + params[:url_name]) -- cgit v1.2.3