Issue Feature Closed

#101346Automatically clear cache on file update of pages where file is inserted

Bernhard Eckl 07/13/23, 12:01 updated 12/02/25, 14:34

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

  1. Georg Ringer commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2023-07-13T16:52:32+00:00" > 07/13/23, 16:52 </span>

    I am not sure if this is really possible. Just a not so rare examples:

    • Given is a menu of subpages including a thumbnail coming from pages’ media field. TYPO3 doesn’t know about the parent page displaying the menu
    • Given is EXT:news (or any other extension) with FAL relations. TYPO3 doesn’t know anything about the list view

    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

  2. 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.

  3. 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.

  4. Georg Ringer commented and changed status Needs Feedback Closed <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

  5. Bernhard Eckl commented and changed subject Automatically clear cache on file update of pages where form is inserted Automatically clear cache on file update of pages where file is inserted status Closed New <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.

  6. Guido Schmechel commented and changed status New Resolved <span data-processor="relativetime" data-value="2025-03-24T19:20:08+00:00" > 03/24/25, 19:20 </span>

    Applied in changeset commit:66482327a9af336a7e7d6abe7e82ac16034f6cc2.