getKeyPrefix extracts the first 16 characters of the key for efficient lookup.
(key string)
| 36 | |
| 37 | // getKeyPrefix extracts the first 16 characters of the key for efficient lookup. |
| 38 | func getKeyPrefix(key string) string { |
| 39 | if len(key) >= 16 { |
| 40 | return key[:16] |
| 41 | } |
| 42 | return key |
| 43 | } |
| 44 | |
| 45 | // getAPIKeyCacheKey generates a cache key for an API key lookup |
| 46 | // Uses the hashed key to ensure consistent cache keys |
no outgoing calls