Versions in this module Expand all Collapse all v1 v1.0.1 Apr 1, 2023 v1.0.0 Apr 1, 2023 Changes in this version + const DefaultCapacity + const ErrInvalidCapacity + const ErrInvalidEntry + const ErrNotFound + const ErrUnexpectedType + func Compile(pattern string, flag Flag) (*regexp.Regexp, error) + func Key(pattern string, flag Flag) string + type Cache interface + Capacity func() int + Clear func() + Get func(ctx context.Context, pattern string, flag Flag) (*regexp.Regexp, error) + SetCapacity func(capacity int) error + Size func() int + type Entry struct + func NewEntry(key, pattern string, regex *regexp.Regexp) *Entry + func (e *Entry) Frequency() uint64 + func (e *Entry) Key() string + func (e *Entry) Load() (*regexp.Regexp, string, error) + func (e *Entry) Pattern() string + type Flag int + const DefaultFlag + const FlagMust + const FlagMustPOSIX + const FlagPOSIX + func (f Flag) String() string