xregexp
xregexp copied to clipboard
Configure XRegExp internal cache to be a sized LRU
I am looking at using XRegExp in a long-running server, where user-supplied regex statements are compiled and used to match values.
Internally, XRegExp uses a cache mechanism to avoid recompiling already-seen patterns. This is great, but will become a memory leak over time as nothing evicts the compiled patterns over time.
Ideally one could configure XRegExp to use an LRU cache instead of the simple object cache so that the size never grows beyond a specified size.