(key string)
| 91 | } |
| 92 | |
| 93 | func (c *LockCache) decodeIdKey(key string) string { |
| 94 | // Safety against accidents |
| 95 | if c.isIdKey(key) { |
| 96 | return key[len(idKeyPrefix):] |
| 97 | } |
| 98 | return key |
| 99 | } |
| 100 | |
| 101 | func (c *LockCache) isIdKey(key string) bool { |
| 102 | return strings.HasPrefix(key, idKeyPrefix) |