xregexp icon indicating copy to clipboard operation
xregexp copied to clipboard

Configure XRegExp internal cache to be a sized LRU

Open mattbishop opened this issue 2 years ago • 2 comments

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.

mattbishop avatar Oct 30 '22 08:10 mattbishop