Skip to content

cleanup: use a cache for JWT/CA instead of reading from disk every time#17

Open
Yuval Kohavi (yuval-k) wants to merge 2 commits into
agent-substrate:mainfrom
yuval-k:yuval-k/cache-jwt
Open

cleanup: use a cache for JWT/CA instead of reading from disk every time#17
Yuval Kohavi (yuval-k) wants to merge 2 commits into
agent-substrate:mainfrom
yuval-k:yuval-k/cache-jwt

Conversation

@yuval-k
Copy link
Copy Markdown

Small PR to fix re-reading the JWT keys and CAs every-time.

For sessionIDJWTPoolFile, sessionIDCAPoolFile check modification time, and if not changed, use cached value.

  • Tests pass

For sessionIDJWTPoolFile, sessionIDCAPoolFile check modification time, and if not changed, use cached value.
@ahmedtd
Copy link
Copy Markdown
Collaborator

This looks good, but actually I think we probably don't even need to check mtimes --- it's probably sufficient to just check if the keys have changed every 5 minutes or so. Root key rotations are not part of the normal operation of the system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants