Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Angular 19 SSR/hybrid rendering engine: cross-request cache #30305

Labels
area: @angular/ssr featureIssue that requests a new feature feature: under considerationFeature request for which voting has completed and the request is now under consideration
@vzarskus

Description

Command

run

Description

It would be a useful optimization to cache some requests during SSR across requests to the SSR server. Some of the API requests have infrequently changing data. Pulling the response from cache would save a lot of network time, especially if the response is big.

Flow:
User 1 makes makes request to Angular SSR server -> SSR makes requests to API in order to gather data for rendering -> request gets cached -> user 1 receives an html response.
User 2 makes request to Angular SSR server -> SSR server would make API request in order to gather data, but instead pulls the response from the cache -> user 2 receives an html response.

One possible implementation would be to consider Cache-Control header and cache the response in the server for the time specified.

If this will not be considered - what would you say is the best approach in order to optimize these kind of API requests? Perhaps a wrapper around global.fetch in Node server (where Angular engine runs) which would monitor every API request and store in some local cache?

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @angular/ssr featureIssue that requests a new feature feature: under considerationFeature request for which voting has completed and the request is now under consideration

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /