()
| 58 | * consistency with the storage method decision. |
| 59 | */ |
| 60 | export function requireRedis() { |
| 61 | if (!isRedisStorage()) { |
| 62 | throw new Error('Redis storage not configured') |
| 63 | } |
| 64 | |
| 65 | const redis = getRedisClient() |
| 66 | if (!redis) { |
| 67 | throw new Error('Redis client unavailable') |
| 68 | } |
| 69 | |
| 70 | return redis |
| 71 | } |
| 72 | |
| 73 | /** |
| 74 | * Reset the cached storage method. |
nothing calls this directly
no test coverage detected