Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In download count module we implement hook_ENTITY_TYPE_access for files which adds a file download count for every downloaded file. However this code is also triggered for comment attachments. Depending on the settings or user permissions some files are excluded and the download count won't be adjusted. The file cache tags are invalidated for every file download.
Proposed resolution
Let's do the invalidating of the cache tags only when the file download count is actually changed.
Comments
Comment #2
jaapjan CreditAttribution: jaapjan for Open Social commentedhttps://github.com/goalgorilla/open_social/pull/1535
Comment #3
jaapjan CreditAttribution: jaapjan for Open Social commented