Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vzarskus opened this issue May 14, 2025 · 1 comment
Open

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

vzarskus opened this issue May 14, 2025 · 1 comment
Labels
area: @angular/ssr feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature

Comments

@vzarskus
Copy link

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

@alan-agius4 alan-agius4 added feature Issue that requests a new feature area: @angular/ssr labels May 15, 2025
@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label May 15, 2025
Copy link
Contributor

angular-robot bot commented May 15, 2025

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @angular/ssr feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature
Projects
None yet
Development

No branches or pull requests

2 participants