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.
Using file entity and media modules I have a link in the body of a node to /file/609. This is automatically rewritten to point to the direct file URL, I assume by the media filter. After replacing the file (via /file/609/edit) the links in the nodes are now stale until a cache flush. Specifically it seems cache_entity_node needs to be cleared for any nodes referencing this file.
The attached patch searches the file_usage table and clears relevant caches after updating a file. Perhaps this would be better suited to the File Entity or Media module, feel free to move it to another queue.
Comment | File | Size | Author |
---|---|---|---|
entitycache-file-update-clear.patch | 1.02 KB | mstrelan | |
|
Comments
Comment #2
mstrelan CreditAttribution: mstrelan commentedComment #3
thePanz CreditAttribution: thePanz at Liip for FREITAG lab. AG commentedI could see this as a File Entity issue, as Entitycache is not responsible of Files.
WDYT?