- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
This bug is still relevant.
The thing is though that
File
entities in Drupal core have no cache contexts or max-age specified, which is why this went unnoticed.
Cache metadata on file entities, that have been uploaded through the text editor, are not bubbling up to the containing node.
I came across this issue whilst working on β¨ Add support for private uploads / presigned URLs Postponed . Our S3 image urls have a signature that expires after a certain amount of time, so we are setting a max-age on the file entity. This however is not working for images uploaded through the texteditor, resulting in expired url signatures and 403s on images.
1) Enable image uploads in one of your text editor settings.
2) Set a max-age on the file entity of 60 seconds (do some logic that changes every 60 minutes, such as dynamically changing url parameters).
3) View the rendered node with render caching enabled
4) Wait 60 seconds
Expected result:
The cache for the file entity + node should regenerate
Actual result:
The previous cache is used.
Set the file as a cacheable dependency of the render array.
n/a
n/a
n/a
Active
11.0 π₯
It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This bug is still relevant.
The thing is though that File
entities in Drupal core have no cache contexts or max-age specified, which is why this went unnoticed.