When saving a focal point, cache entries related to the file to which the focal point is applied are invalidated:

Cache::invalidateTags(array($this->fid));

However, the cache tags generated for files is not just the file id, but "file:[file id]". The correct way to invalidate the cache tags would be:

Cache::invalidateTags(array('file:' . $this->fid)); 

In addition to correctly invalidating caches, this also fixes an error that is thrown because cache tags must be strings, not integers.

CommentFileSizeAuthor
focal_point_cache_tags.patch447 bytesfloretan

Comments

floretan created an issue. See original summary.

  • bleen18 committed 858f8d2 on 8.x-1.x authored by floretan
    Issue #2565665 by floretan: Fixing incorrect tag used to invalidate...
bleen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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