Initial discussion: #83280 (comment)
In #83280 we migrated the /translations route to core.
This route was using etag based cache. We should adapt the caching mechanism to use cache-control: max-age when in dist mode to avoid an unnecessary http roundtrip , as the content of the translation file is not going to change as long as no additional plugins (with their own translation files) are added.
Note that doing so would require some refactoring to use the file's content hash in the requested url to use it as invalidation mechanism. That means that the client-side must get knowledge of this hash, probably via the injected metadatas.
Initial discussion: #83280 (comment)
In #83280 we migrated the
/translationsroute to core.This route was using
etagbased cache. We should adapt the caching mechanism to usecache-control: max-agewhen in dist mode to avoid an unnecessary http roundtrip , as the content of the translation file is not going to change as long as no additional plugins (with their own translation files) are added.Note that doing so would require some refactoring to use the file's content hash in the requested url to use it as invalidation mechanism. That means that the client-side must get knowledge of this hash, probably via the injected metadatas.