Closed tiegz closed 2 months ago
this new column can cache the most recently published Project#versions so we can do includes() and joins() against it. We currently do a query everytime we fetch latest_version: https://github.com/librariesio/libraries.io/blob/8cad44493718ea89347074a08db925dd5ca48b80/app/models/concerns/releases.rb#L40-L42
Project#versions
includes()
joins()
latest_version
in a followup PR, we'll backfill this value, change it to a real association, and keep it updated in the same place that we keep latest_release_published_at + latest_release_number updated: https://github.com/librariesio/libraries.io/blob/main/app/models/project.rb#L268-L270
latest_release_published_at
latest_release_number
(NB: "latest release" means "either latest version or latest tag", but "latest version" will simply be the latest Version only)
this new column can cache the most recently published
Project#versions
so we can doincludes()
andjoins()
against it. We currently do a query everytime we fetchlatest_version
: https://github.com/librariesio/libraries.io/blob/8cad44493718ea89347074a08db925dd5ca48b80/app/models/concerns/releases.rb#L40-L42in a followup PR, we'll backfill this value, change it to a real association, and keep it updated in the same place that we keep
latest_release_published_at
+latest_release_number
updated: https://github.com/librariesio/libraries.io/blob/main/app/models/project.rb#L268-L270(NB: "latest release" means "either latest version or latest tag", but "latest version" will simply be the latest Version only)