Len returns the number of compiled regular expressions in the cache.
()
| 123 | |
| 124 | // Len returns the number of compiled regular expressions in the cache. |
| 125 | func (rc *RegexpCache) Len() int { |
| 126 | if rc == nil { |
| 127 | return 0 |
| 128 | } |
| 129 | rc.mu.Lock() |
| 130 | defer rc.mu.Unlock() |
| 131 | return rc.cache.Len() |
| 132 | } |