Skip to content

Commit

Permalink
Merge pull request #752 from dosyfier/fix-gitcache-404
Browse files Browse the repository at this point in the history
Fix #715 by correcting misuse of ActiveRecord API for GitCache objects
  • Loading branch information
PowerKiKi authored Jun 28, 2020
2 parents 3427246 + 21df0cf commit 8fe4eea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/redmine_git_hosting/cache/database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def clear_cache_for_repository(repo_id)
end

def apply_cache_limit
GitCache.find(:last, order: 'created_at DESC').destroy if max_cache_elements >= 0 && GitCache.count > max_cache_elements
GitCache.order(:created_at).first.destroy if max_cache_elements >= 0 && GitCache.count > max_cache_elements
end
end
end
Expand Down

0 comments on commit 8fe4eea

Please sign in to comment.