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
Comment #4
gábor hojtsy