framework-one/fw1 — pull request #192 by jcberquist (2013-09-14 18:15:45+00:00)
Title: added regex caching in route processing

So here is my take on caching the regex generation in route processing. I thought it best to change as little as possible, and then, if this approach is valid, I could revisit route generation.

I created the cache key for the regex by hashing the route and target strings together. One could just create a cache key via concatenating the strings together, but then the keys have the potential to be much longer. I don't know the relative performance implications of the two approaches? Obviously I would be happy to change it if you think merely concatenating the strings would be better.