fixed sonarqube issues
This commit is contained in:
@@ -18,7 +18,7 @@ Your authorization microservice is now **fully horizontally scalable** using Red
|
||||
|
||||
#### 2. Cache Architecture
|
||||
|
||||
```
|
||||
```text
|
||||
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
||||
│ Instance 1 │ │ Instance 2 │ │ Instance 3 │
|
||||
└──────┬──────┘ └──────┬──────┘ └──────┬──────┘
|
||||
@@ -39,20 +39,20 @@ Your authorization microservice is now **fully horizontally scalable** using Red
|
||||
|
||||
#### 3. Key Features
|
||||
|
||||
**Dual-Layer Caching**
|
||||
#### Dual-Layer Caching
|
||||
|
||||
- Primary: Redis (distributed, shared across instances)
|
||||
- Secondary: Local in-memory (failover, performance boost)
|
||||
- Automatic fallback when Redis unavailable
|
||||
|
||||
**Consistency Guarantees**
|
||||
#### Consistency Guarantees
|
||||
|
||||
- All instances share the same Redis cache
|
||||
- 30-second automatic cache refresh
|
||||
- Manual invalidation via `InvalidateUserCache()`
|
||||
- Force refresh via `RefreshCacheNow()`
|
||||
|
||||
**Performance Optimizations**
|
||||
#### Performance Optimizations
|
||||
|
||||
- JSON serialization for complex objects
|
||||
- 100ms timeout for Redis operations
|
||||
@@ -313,7 +313,7 @@ var (
|
||||
| Medium Cluster | 5 | ~10,000 | <20ms |
|
||||
| Large Cluster | 10+ | ~20,000+ | <25ms |
|
||||
|
||||
_Note: Assumes Redis on same network, PostgreSQL optimized_
|
||||
> **Note:** Assumes Redis on same network, PostgreSQL optimized
|
||||
|
||||
### Cache Effectiveness
|
||||
|
||||
|
||||
Reference in New Issue
Block a user