Project

General

Profile

Actions

Feature #101346

open

Automatically clear cache on file update of pages where form is inserted

Added by Bernhard Eckl 10 months ago. Updated 10 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2023-07-13
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

Actions #1

Updated by Georg Ringer 10 months ago

  • Status changed from New to Needs Feedback

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

Actions #2

Updated by Bernhard Eckl 10 months ago

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.

Actions #3

Updated by Benni Mack 10 months ago

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.

Actions

Also available in: Atom PDF