We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3427246 + 21df0cf commit 8fe4eeaCopy full SHA for 8fe4eea
lib/redmine_git_hosting/cache/database.rb
@@ -47,7 +47,7 @@ def clear_cache_for_repository(repo_id)
47
end
48
49
def apply_cache_limit
50
- 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
51
52
53
0 commit comments