Skip to content

Use cache-control: max-age instead of etag for /translations route #83409

@pgayvallet

Description

@pgayvallet

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.

Metadata

Metadata

Assignees

Labels

Team:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//chore

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions