krakenjs/reverend — pull request #5 by zertosh (2014-09-06 23:27:12+00:00)
Title: Added "path2regex" regex caching

`path2regex` generates new regexs everytime `reverend` is called. Since `path2regex` is deterministic, we can avoid taxing the GC by caching its results.

I considered also including a `nocache` option, and/or exposing a `clearCache()` method, but it doesn't seem very useful. Let me know if that's something I should include in this PR.