Skip to content

Commit 8fe4eea

Browse files
authored
Merge pull request #752 from dosyfier/fix-gitcache-404
Fix #715 by correcting misuse of ActiveRecord API for GitCache objects
2 parents 3427246 + 21df0cf commit 8fe4eea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/redmine_git_hosting/cache/database.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def clear_cache_for_repository(repo_id)
4747
end
4848

4949
def apply_cache_limit
50-
GitCache.find(:last, order: 'created_at DESC').destroy if max_cache_elements >= 0 && GitCache.count > max_cache_elements
50+
GitCache.order(:created_at).first.destroy if max_cache_elements >= 0 && GitCache.count > max_cache_elements
5151
end
5252
end
5353
end

0 commit comments

Comments
 (0)