- Issue created by @dieterholvoet
- 🇧🇪Belgium dieterholvoet Brussels
I also propose renaming the
proxy_cache_maximum_age
option tocache_max_age
since it's misleading: that max-age is not only used in case of reverse proxies, but every time an image is served by drimage. - Status changed to Needs review
about 1 year ago 12:47pm 26 February 2024 - Merge request !9Rename proxy_cache_maximum_age to cache_max_age & disable cache when option is 0 → (Merged) created by dieterholvoet
- Status changed to Needs work
about 1 year ago 1:19pm 26 February 2024 - 🇧🇪Belgium dieterholvoet Brussels
I changed DrImageController to disable caching in case the option is set to 0, but that doesn't fix everything yet. Redirect responses caused by PathProcessorImageStyles are still being cached, which causes any subsequent page loads to keep redirecting to the drimage endpoint with a path in the format
$path_prefix . $width . '/' . $height . '/' . $fid . '/' . $iwc_id . '/' . $format
, not allowing Apache to directly serve the generated file. I'll try to add a response subscriber that disables caching for those redirect responses. - Status changed to Needs review
about 1 year ago 1:35pm 26 February 2024 - 🇧🇪Belgium dieterholvoet Brussels
Okay, so this works:
- First request is to
/nl/drimage/1500/0/67/event_header/sites/default/files/media/images/Agenda_Detail%20Page%204_%20Study%20Spaces%20Zomer%20-%20Content.jpg.webp
, redirects to/nl/drimage/1500/0/67/event_header/webp
(served by Drupal, not cached) - Second request is to
/nl/drimage/1500/0/67/event_header/webp
, serves the image (served by Drupal, not cached) - After reloading the page, first request is again to
/nl/drimage/1500/0/67/event_header/sites/default/files/media/images/Agenda_Detail%20Page%204_%20Study%20Spaces%20Zomer%20-%20Content.jpg.webp
, but this time served by Apache and still not cached - After reloading the page, the request is served from browser cache
This could still be improved: if we could get rid of
PathProcessorImageStyles
, the second request could serve the image and the image would be served from cache during the second page load instead of during the third. This is only the case for the first user loading the image if it hasn't been generated yet though, so might not be worth the effort. - First request is to
-
DieterHolvoet →
committed bf038907 on 2.x
Issue #3423817 by DieterHolvoet: Image cache headers are sometimes...
-
DieterHolvoet →
committed bf038907 on 2.x
- Status changed to Fixed
about 1 year ago 2:33pm 14 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.