   _cache : {} #all the data
   _routes_loaded : {} #keys that have already been fetched from server
 
-  constructor : (options) -> @options = _.defaults options, {routes : {}}
+  constructor : (options) -> 
+    @options = _.defaults options, {routes : {}}
+
+    # cache route regex
+    for key in _.keys @options.routes 
+      @options.routes[key] = [new RegExp(key), @options.routes[key]]
 
   fetch : (key) -> 
 


  # Tries to identify a server endpoint for this key
  _endpoint : (key) ->
    for endpoint in _.keys(@options.routes)
      regex = new RegExp endpoint, "g"
      if regex.test key
        return @options.routes[endpoint]
    return false

  # ##########


        when 'shouldComponentUpdate'
          @_shouldComponentUpdate arguments...

      if old_method then (old_method.bind(this))(arguments...) else {}

  wrap name for name in to_wrap
