We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1d3f57 commit ec6b58cCopy full SHA for ec6b58c
app/models/solid_cache/entry/expiration.rb
@@ -40,6 +40,8 @@ def expiry_candidate_ids(count, max_age:, max_entries:, max_size:)
40
candidates.pluck(:id)
41
else
42
min_created_at = max_age.seconds.ago
43
+ # We don't have an index on created_at, but we can select
44
+ # the records by id and they'll be in created_at order.
45
candidates.pluck(:id, :created_at)
46
.filter_map { |id, created_at| id if created_at < min_created_at }
47
end
0 commit comments