Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#30,305 4 commenti 29 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
angular, node.js, typescript

Direzione di ricerca

Non vengono indicati file, test o punti di ingresso concreti. Inizia tracciando il percorso della richiesta di Angular SSR/hybrid rendering nel server Node e verificando come viene usato global.fetch; definisci l'ambito della cache, la scadenza e il comportamento di Cache-Control prima dell'implementazione. Per considerare il lavoro completato sarebbero necessari un design concordato, un'implementazione e una coverage per il caching tra richieste.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: @angular/ssr feature feature: under consideration
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

Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
17h 25m
PR unite (30g)
183

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di angular/angular-cli

Tutte le issue di angular/angular-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.