mirror of
https://github.com/lukaszraczylo/traefikoidc.git
synced 2026-10-15 04:18:03 +00:00
Merge main into 0.8.0-redis: resolve conflicts
Merged the following features from main: - Dynamic Client Registration (RFC 7591) - Sharded cache and CPU spike prevention - Documentation updates (CNAME, index.html) Resolved conflicts in: - settings.go: Combined Redis config with Dynamic Client Registration config - universal_cache_singleton.go: Merged Redis backend support with consolidated cleanup Both features now work together: - Redis distributed caching with circuit breaker and health checks - Consolidated cleanup goroutine (reduces from 7 to 1) - SkipAutoCleanup flag honored for all cache types
This commit is contained in:
+11
-2
@@ -37,6 +37,11 @@ type UniversalCacheConfig struct {
|
||||
Logger *Logger
|
||||
Strategy CacheStrategy // For backward compatibility
|
||||
|
||||
// SkipAutoCleanup skips starting the per-cache cleanup goroutine.
|
||||
// Use this when cleanup is managed externally (e.g., by UniversalCacheManager)
|
||||
// to reduce goroutine count and consolidate cleanup operations.
|
||||
SkipAutoCleanup bool
|
||||
|
||||
// Type-specific configurations
|
||||
TokenConfig *TokenCacheConfig
|
||||
MetadataConfig *MetadataCacheConfig
|
||||
@@ -158,8 +163,12 @@ func createUniversalCache(config UniversalCacheConfig) *UniversalCache {
|
||||
cancel: cancel,
|
||||
}
|
||||
|
||||
// Start cleanup routine
|
||||
cache.startCleanup()
|
||||
// Start cleanup routine only if not skipped
|
||||
// When cleanup is managed externally (e.g., by UniversalCacheManager),
|
||||
// skip per-cache cleanup to reduce goroutine count
|
||||
if !config.SkipAutoCleanup {
|
||||
cache.startCleanup()
|
||||
}
|
||||
|
||||
return cache
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user