Are settings modified at runtime?  Or is that a Django anti-pattern (it seems like it would be)?  If so, I could envision a case where the patterns are lazily compiled, then the setting is changed, and the patterns aren't recompiled.

I also considered a dynamic cache that just mapped the pattern strings to compiled regexes, however, that would basically duplicate the code in the python library...

I'll post a patch with explicit compliation shortly and we can compare the options.