refactor: set senior stock cache ttl from settings#8
Merged
br-monteiro merged 2 commits intoMar 17, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces configurable cache TTL (time-to-live) settings for authentication tokens and stock data in the Senior Stock API integration. It allows users to adjust how long authentication tokens and stock data are cached, either through configuration files or environment variables, and updates the documentation accordingly.
Configuration and documentation updates:
cache_token_ttl_secondsandcache_data_ttl_secondsas optional settings in the configuration example inREADME.md, and documented their purpose and default values. [1] [2]README.mdto includeONECLI_CACHE_TOKEN_TTL_SECONDSandONECLI_CACHE_DATA_TTL_SECONDS.Implementation of configurable cache TTLs:
SeniorStockAPIclass insenior_stock_api.pyto readcache_token_ttl_secondsandcache_data_ttl_secondsfrom settings, falling back to default constants if not provided.