Problem/Motivation

The response returned by the controller are not currently cacheable.

Given how often the route may be called on more complex installations, I think it makes sense to try and leverage Drupal's caching API here to reduce the load on the backend.

Steps to reproduce

N/A

Proposed resolution

Ensure that the returned responses implement the \Drupal\Core\Cache\CacheableResponseInterface interface.
As well as provide API to ensure that the response object can be invalidated as appropriate.

Remaining tasks

Provide an issue fork/patch.

User interface changes

N/A

API changes

N/A

Issue fork adstxt-3215023

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

codebymikey created an issue. See original summary.

codebymikey’s picture

Issue summary: View changes
Status: Active » Needs review

marcelovani made their first commit to this issue’s fork.

marcelovani’s picture

Thanks for the amazing work done here.

marcelovani’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.