Problem

Drupal 7 cached the "Top downloads" list of a language page for a day and the project downloads for an hour, so a repackaged release showed up after that or after a cache clear. On 3.0.x the top downloads block declares only the path cache context: no tags, no lifetime. The rows it is built from are cached for an hour without tags either. So the block keeps showing the files of the first render until the render cache is rebuilt, whatever gets repackaged, added or highlighted.

Proposed resolution

  • The row cache of the packager carries the packager file and release list tags, so repackaging replaces the rows at once instead of after an hour.
  • The block carries the same tags, the project list tag (the top twenty can change) and the community settings tag (the highlighted project), and a lifetime equal to the row cache. Better than the Drupal 7 day: a repackaged release shows right away.

Tests

Drupal 7 first: testTopDownloadsCache() packages a second release and checks that the language page keeps the cached list until the packager cache is cleared. On 3.0.x the downloads page test packages the second release and expects the block to list it right away, which fails without the tags.

LLM disclosure

LLM was used to find, diagnose explain and fix this issue. With human review.

Comments

gábor hojtsy created an issue. See original summary.

  • 7ba12624 committed on 7.x-1.x
    Issue #3621733: Top downloads block is cached without tags or lifetime,...

  • 6d421e79 committed on 3.0.x
    fix #3621733: Top downloads block is cached without tags or lifetime,...
gábor hojtsy’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.