Task #27814
Add runtime cache control functionality to Rigel client
Start date:
31/05/2025
Due date:
% Done:
100%
Estimated time:
Description
Implement the ability to enable/disable caching at runtime in the Rigel configuration client.
Currently, the Rigel client always uses caching for configuration values. There are legitimate use cases that require runtime cache control:
- Debugging: Temporarily disable cache to get fresh values when investigating configuration issues
- Health checks: Verify actual etcd connectivity rather than cached responses
- Critical operations: Ensure latest values for time-sensitive operations (payment limits, feature flags)
- Performance testing: Compare cached vs non-cached performance
The implementation must be thread safe.
Updated by Sachin Divekar 10 days ago
- Status changed from In Progress to Testing
Use Case Examples:
// Debugging production issue
client.DisableCaching()
freshValue := client.Get("problematic_key")
client.EnableCaching()
// Health check
func healthCheck() error {
client.DisableCaching()
defer client.EnableCaching()
_, err := client.Get("health_key")
return err
}
// Critical operation
func processPayment() {
client.DisableCaching()
defer client.EnableCaching()
limit := client.GetFloat("payment_limit") // Always fresh
}