fix: hotel and product images in the API no longer depend on cache order

The image services cached under images-<table>-<uid> without the field, so
the teaser images (teaser_images, rendered by the frontend) and the full
image lists for MyE&P (images, /api/hotel and /api/product) shared one
cache entry. Once a page had shown a hotel teaser, the API answered with
that single teaser image instead of all images. The field is now part of
the key.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
frommeandClaude Opus 5.5 committed 2026-10-26 10:59:16 +01:00
1 parent fe3af34063
commit 96632edf44
1 file changed
+1 -1
@@ -41,7 +41,7 @@ abstract class AbstractImageService implements SingletonInterface
public function getImages($uid): array
{
$key = sprintf('images-%s-%d', $this->table, $uid);
$key = sprintf('images-%s-%s-%d', $this->table, $this->field, $uid);
if (false === ($value = $this->cache->get($key))) {
$original = $this->fileRepository->findByRelation(
$this->table,