TimezoneController could return a cacheable response

Created on 23 March 2025, 18 days ago

Problem/Motivation

Responses returned by TimezoneController are not cacheable.
I don't think the responses varies so we should be able to cache it.

Steps to reproduce

Send a GET request to /system/timezone/CET.
The response has these headers:

Cache-Control: must-revalidate, no-cache, private
X-Drupal-Cache: UNCACHEABLE (no cacheability)
X-Drupal-Dynamic-Cache: UNCACHEABLE (no cacheability)

Proposed resolution

The controller should return a CacheableJsonResponse with the appropriate cache contexts (probably route).

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component

other

Created by

πŸ‡«πŸ‡·France prudloff Lille

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024