recache
Package recache
is a lightweight caching library for Go's standard regular
expression package that offers improved performance
by avoiding recompilation of global regular expression variables and by caching
regular expressions.
Features
- Stable cache interface.
- Simple and easy-to-use API.
- Thread-safe caching of compiled regular expressions.
- Lazy compilation of regular expressions.
- Minimal memory allocations.
recache.Cache
implementations
The recache
package itself only provides a cache interface and some utility
functions for users who wish to implement that interface. You can either use an
implementation created by someone else or write your own.
Implementations
If wrote a recache.Cache
implementation and wish it to be linked here,
please send a patch.
Installation
To install recache
alone, run:
go get git.sr.ht/~jamesponddotco/recache-go
Contributing
Anyone can help make recache better. Check out the contribution
guidelines
for more information.
Resources
The following resources are available:
Released under the MIT License.