pjfanning commented on PR #546:
URL: https://github.com/apache/pekko-management/pull/546#issuecomment-3546589819

   I asked an AI agent about not caching.
   
   > Summary: Yes, read the token file on every API call
   > 
   > It's the expected and correct behavior
   > Required for auto-rotation to work seamlessly
   > Zero meaningful performance cost
   > Used by official clients (client-go, python-kubernetes, etc.)
   > Avoids outages from expired tokens
   >
   > Do it. Don’t cache long-term. Your cluster thanks you.
   
   One point raised is that there still might be timing issues where you read 
the token file but it rotates just before you use it. According to the AI I 
used, the old token is invalidated at rotation time.
   
   So, maybe the best enhancement is to handle 401s by retrying.
   
   We could come back to caching later.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to