diff --git a/app/models/commit.rb b/app/models/commit.rb
index 6a0d32d406ebda99ac76425ccf28e6b9ff7e0e61..486ad6714d9d1cb217043c840488ba580063cb2a 100644
--- a/app/models/commit.rb
+++ b/app/models/commit.rb
@@ -178,14 +178,18 @@ class Commit
   end
 
   def author
-    key = "commit_author:#{author_email}"
-
-    # nil is a valid value since no author may exist in the system
-    unless RequestStore.store.has_key?(key)
-      RequestStore.store[key] = User.find_by_any_email(author_email.downcase)
+    if RequestStore.active?
+      key = "commit_author:#{author_email.downcase}"
+      # nil is a valid value since no author may exist in the system
+      if RequestStore.store.has_key?(key)
+        @author = RequestStore.store[key]
+      else
+        @author = find_author_by_any_email
+        RequestStore.store[key] = @author
+      end
+    else
+      @author ||= find_author_by_any_email
     end
-
-    @author ||= RequestStore.store[key]
   end
 
   def committer
@@ -313,6 +317,10 @@ class Commit
 
   private
 
+  def find_author_by_any_email
+    User.find_by_any_email(author_email.downcase)
+  end
+
   def repo_changes
     changes = { added: [], modified: [], removed: [] }
 
diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb
index ec1544bf8158276a209e350457fd7081ebd9c458..c3392ee7440ca67a7d57df48e4fb47ab9527223b 100644
--- a/spec/models/commit_spec.rb
+++ b/spec/models/commit_spec.rb
@@ -13,6 +13,26 @@ describe Commit, models: true do
     it { is_expected.to include_module(StaticModel) }
   end
 
+  describe '#author' do
+    it 'looks up the author in a case-insensitive way' do
+      user = create(:user, email: commit.author_email.upcase)
+      expect(commit.author).to eq(user)
+    end
+
+    it 'caches the author' do
+      user = create(:user, email: commit.author_email)
+      expect(RequestStore).to receive(:active?).twice.and_return(true)
+      expect_any_instance_of(Commit).to receive(:find_author_by_any_email).and_call_original
+
+      expect(commit.author).to eq(user)
+      key = "commit_author:#{commit.author_email}"
+      expect(RequestStore.store[key]).to eq(user)
+
+      expect(commit.author).to eq(user)
+      RequestStore.store.clear
+    end
+  end
+
   describe '#to_reference' do
     it 'returns a String reference to the object' do
       expect(commit.to_reference).to eq commit.id