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

jaapjan created an issue. See original summary.

jaapjan’s picture

jaapjan’s picture

Status: Needs review » Fixed

  • a77737a committed on 8.x-7.x
    Issue #3086229 by jaapjan: Download count: Invalidate file cache tags...

Status: Fixed » Closed (fixed)

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