#101346Automatically clear cache on file update of pages where file is inserted
Description
If a file is updatet (metadate update file replaced or filename changed) the cache of the page where it is inserted should be cleared. TYPO3 knows the references, so the pages of the reference could be cleared.
Reviews 1
History 10
-
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2023-07-13T16:52:32+00:00" > 07/13/23, 16:52 </span> -
Bernhard Eckl commented <span data-processor="relativetime" data-value="2023-07-13T18:23:09+00:00" > 07/13/23, 18:23 </span>
I understand that this is not that easy. But how about automatic cache clearing just for files referenced in content elements? This should be easier than other scenarios and covers the most important. Every ce has a pid so the page where it is inserted is known.
-
Benni Mack commented <span data-processor="relativetime" data-value="2023-07-19T14:09:54+00:00" > 07/19/23, 14:09 </span>
I used an extension called EXT:proxycachemanager which checked all images on a frontend page, and used that. However, that turned out to be really slow when indexing a page. Main issue is: A cache entry will have lots of tags in it, thus making the DB really full. I think we could improve that by using a JsonBackend (see https://review.typo3.org/c/Packages/TYPO3.CMS/+/73696) which would be more efficient, I guess. Then we could turn this into a feature, and actually track every file, record that is used on a page, and add this as a cache tag. In general this would be a feature which could take a while to implement and to test.
-
Georg Ringer changed Related to #101345 <span data-processor="relativetime" data-value="2025-03-04T17:04:04+00:00" > 03/04/25, 17:04 </span>
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2025-03-04T17:04:26+00:00" > 03/04/25, 17:04 </span>closing this issue as duplicate of #101345
-
Georg Ringer changed
Related to #101345<span data-processor="relativetime" data-value="2025-03-04T17:04:32+00:00" > 03/04/25, 17:04 </span> -
Georg Ringer changed Duplicates #101345 <span data-processor="relativetime" data-value="2025-03-04T17:04:38+00:00" > 03/04/25, 17:04 </span>
-
Bernhard Eckl commented and changed subject
Automatically clear cache on file update of pages where form is insertedAutomatically clear cache on file update of pages where file is inserted statusClosedNew <span data-processor="relativetime" data-value="2025-03-05T08:05:59+00:00" > 03/05/25, 08:05 </span>It seems that I have taken the same title for two different issues. This one is for file changes (e.g. image is replaced) -> should delete cache of pages where the file is referenced (e.g. an image in textmedia element). The other one is for clearing the cache of the page where an edited form is referenced.
-
Guido Schmechel commented and changed status
NewResolved <span data-processor="relativetime" data-value="2025-03-24T19:20:08+00:00" > 03/24/25, 19:20 </span>Applied in changeset commit:66482327a9af336a7e7d6abe7e82ac16034f6cc2.
-
Benni Mack changed status
ResolvedClosed <span data-processor="relativetime" data-value="2025-12-02T14:34:00+00:00" > 12/02/25, 14:34 </span>
I am not sure if this is really possible. Just a not so rare examples:
Caching and cache clearing is really hard to avoid false positives and knowing every option.
Especially on larger sites, people even disable the automatic clearance because with many editors this leads to a lot of cache clearing. On smaller sites you could just clear the full page cache no matter which record is changed.
Additionally there are a lot of hooks on the right places to trigger custom clearing.
Therefore I suggest to reject the issue and I suggest to create an extension which would cover all possible edge cases. Additionally such extension can also contain checks for EXT:news (or any other popular extension) which is impossible within the core.
Feel free to discuss this also with me on slack