-
Notifications
You must be signed in to change notification settings - Fork 56
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
[TECH] Suppression de la mise en cache sur certaines routes pour gérer le cache par Baleen #11189
Conversation
Une fois les applications déployées, elles seront accessibles via les liens suivants :
Les variables d'environnement seront accessibles via les liens suivants : |
57a5f56
to
d1f121b
Compare
d1f121b
to
d0f0ce9
Compare
api/src/identity-access-management/application/oidc-provider/oidc-provider.route.js
Show resolved
Hide resolved
d0f0ce9
to
8c8e68a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bizarre, lorsque je teste en local le header cache-control
est bien différent d'avant cette PR, mais il est toujours présent 🤔
Avant :
curl --insecure --include https://app.dev.pix.fr/api/feature-toggles
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 27 Jan 2025 15:49:32 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 782
Connection: keep-alive
X-Powered-By: Express
cache-control: max-age=30, must-revalidate
Vary: origin, Accept-Encoding
access-control-expose-headers: WWW-Authenticate,Server-Authorization
Avec cette PR :
curl --insecure --include https://app.dev.pix.fr/api/feature-toggles
HTTP/1.1 200 OK
Server: nginx
Date: Mon, 27 Jan 2025 15:50:02 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 782
Connection: keep-alive
X-Powered-By: Express
Cache-Control: private, max-age=0, must-revalidate
Vary: origin, Accept-Encoding
access-control-expose-headers: WWW-Authenticate,Server-Authorization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Lu et testé fonctionnellement avec succès
Sur les RA, comme prévu, les routes modifiées n'ont bien pas de header cache-control
.
…de Hapi.dev v17+ config étant gardé pour compatibilité ascendante mais ne permet pas de prendre en compte les nouveaux comportement comme la spéiification du comportement de header de cache.
…puisse être cachée par Baleen
8c8e68a
to
c412b26
Compare
🥞 Problème
Certaines routes sont quasiment statiques mais sont servies à chaque fois car baleen ne les cache pas à cause du header cache-control
🥓 Proposition
supprimer le header cache-control
Remarque
Depuis Hapi.dev v17, config a été déprécié et remplacé par options. Toutefois le nom config restait pour compatibilité ascendante.
Or lors de nos tests, il semble que config.cache ne soit pas pris en compte, d'où le changement vers la notation state of the art afin de pouvoir changer le comportement du cache.