 +        assert "/" not in child_name, "Child name may not contain '/': %s" % (child_name,)
 +
 +        segment = unquote(child_name)
-+
-+        def notFound(f):
-+            f.trap(http.HTTPError)
-+            if f.response.code != responsecode.NOT_FOUND:
+ 
+         def notFound(f):
+             f.trap(http.HTTPError)
+@@ -414,10 +471,13 @@
+         def notFound(f):
+             f.trap(http.HTTPError)
+             if f.response.code != responsecode.NOT_FOUND:
+-                raise f
 +                return f
-+            return None
-+
+             return None
+ 
+-        return defer.maybeDeferred(self._getChild, None, self.site.resource, segments, updatepaths=False)
 +        d = defer.maybeDeferred(self._getChild, None, parent, [segment], updatepaths=False)
 +        d.addCallback(self._rememberResource, url)
 +        d.addErrback(notFound)
 +        return d
-+
+ 
      def _processingFailed(self, reason):
          if reason.check(http.HTTPError) is not None:
-             # If the exception was an HTTPError, leave it alone

 
     def locateResource(self, url):
         """
@@ -385,8 +397,13 @@
             The contained response will have a status code of
             L{responsecode.BAD_REQUEST}.
         """
-        if url is None: return None
+        if url is None:
+            return None
 
+        cached = self._urlsByResource.get(url, None)
+        if cached is not None:
+            return succeed(cached)
+
         #
         # Parse the URL
         #
@@ -406,19 +423,62 @@
                 "URL is not on this site (%s://%s/): %s" % (scheme, self.headers.getHeader("host"), url)
             ))
 

         assert segments[0] == "", "URL path didn't begin with '/': %s" % (path,)
         segments = segments[1:]
-        segments = map(unquote, segments)
+
+        def notFound(f):
+            f.trap(http.HTTPError)
+            if f.response.code != responsecode.NOT_FOUND:
+                return f
+            return None
+
+        d = defer.maybeDeferred(self._getChild, None, self.site.resource, segments, updatepaths=False)
+        d.addCallback(self._rememberResource, path)
+        d.addErrback(notFound)
+        return d
+
+    def locateChildResource(self, parent, child_name):
+        """
+        Looks up the child resource with the given name given the parent
