🏦 refactor: Centralize Caching & Redis Key Prefixing (#8457)

* 🔧 Overhauled caching feature:
- Refactored caching logic.
- Fixed redis prefix, namespace, tls, ttl, and cluster.
- Added REDIS_KEY_PREFIX_VAR

* # refactor: Rename redisCache to standardCache

* # Add Redis pinging mechanism to maintain connection.

* # docs: Add warning about Keyv Redis client prefix support
This commit is contained in:
Theo N. Truong 2025-07-15 16:24:31 -06:00 committed by GitHub
parent 418b5e9070
commit 01b012a8fa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 1407 additions and 526 deletions

View file

@ -1064,10 +1064,12 @@ export enum InfiniteCollections {
* Enum for time intervals
*/
export enum Time {
ONE_DAY = 86400000,
ONE_HOUR = 3600000,
THIRTY_MINUTES = 1800000,
TEN_MINUTES = 600000,
FIVE_MINUTES = 300000,
THREE_MINUTES = 180000,
TWO_MINUTES = 120000,
ONE_MINUTE = 60000,
THIRTY_SECONDS = 30000,
@ -1167,6 +1169,14 @@ export enum CacheKeys {
* key for open id exchanged tokens
*/
OPENID_EXCHANGED_TOKENS = 'OPENID_EXCHANGED_TOKENS',
/**
* Key for OpenID session.
*/
OPENID_SESSION = 'openid_session',
/**
* Key for SAML session.
*/
SAML_SESSION = 'saml_session',
}
/**
@ -1213,6 +1223,30 @@ export enum ViolationTypes {
* Tool Call Limit Violation.
*/
TOOL_CALL_LIMIT = 'tool_call_limit',
/**
* General violation (catch-all).
*/
GENERAL = 'general',
/**
* Login attempt violations.
*/
LOGINS = 'logins',
/**
* Concurrent request violations.
*/
CONCURRENT = 'concurrent',
/**
* Non-browser access violations.
*/
NON_BROWSER = 'non_browser',
/**
* Message limit violations.
*/
MESSAGE_LIMIT = 'message_limit',
/**
* Registration violations.
*/
REGISTRATIONS = 'registrations',
}
/**