Skip to content

increase timeout for secret cache ttl#5418

Closed
jonmosco wants to merge 1 commit intoapp-sre:masterfrom
jonmosco:vault-timeout-api
Closed

increase timeout for secret cache ttl#5418
jonmosco wants to merge 1 commit intoapp-sre:masterfrom
jonmosco:vault-timeout-api

Conversation

@jonmosco
Copy link
Contributor

Increase secret cache TTL from 5 seconds to 5 minutes. This will hopefully reduce vault secret reads.

Copy link
Contributor

@bkez322 bkez322 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jonmosco jonmosco requested a review from hemslo February 10, 2026 22:39
value = self.secret_backends[secret.url].read(secret)
# TODO : TTL from config
self.cache.set(cache_key, value, 5)
self.cache.set(cache_key, value, 300)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't increase this TTL! TBH, I don't trust Redis/ElastiCache enough to store our secrets permanently! These 5 seconds are for performance reasons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link to #5332 (comment) to be covered by in memory cache for the whole request lifecycle

@jonmosco
Copy link
Contributor Author

Ok, will close this and investigate further.

@jonmosco jonmosco closed this Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants