INNER CODE UNIT · Python
DEFAULT_CACHE_TTL
sunithvs/devb.io · config/settings.py:42
DEFAULT_CACHE_TTL = 3600 * 24 * 7 # 1 week
CACHE_ENABLED = os.getenv("CACHE_ENABLED", "true").lower() == "true"
_GITHUB_API_TOKENS = os.getenv("API_TOKEN_GITHUB", "").split(',')
_GROQ_API_KEYS = os.getenv("GROQ_API_KEY", "").split(',')
_github_token_index = 0
_groq_key_index = 0
_lock = threading.Lock()
@classmethod
def get_github_token(cls):
"""
Retrieve and rotate GitHub API tokens in a thread-safe manner.