CompileRegex compiles a pattern p into a regex and returns the regex object.
The regex object will be cached by an LRU. If p has already been compiled
and cached, this function will return the cached regex object. If not
already cached, it will compile p into a regex object and cache it in the
LRU. This function will return an error if the LRU has not already been
initialized.
type RegexCompileLRU struct {
// The lru package doesn't provide any concurrency guarantees so we must// provide our own locking. *lock.Mutex *lru.Cache}
RegexCompileLRU is an LRU cache for storing compiled regex objects of FQDN
names or patterns, used in CiliumNetworkPolicy or
ClusterwideCiliumNetworkPolicy.