def getNode(self, nodePath):
    """Returns a Ceres node given a metric name. Because nodes are looked up in
    every read and write, a caching mechanism is provided. Cache behavior is set
    using :func:`setNodeCachingBehavior` and defaults to the value set in
    ``DEFAULT_NODE_CACHING_BEHAVIOR``

    The following behaviors are available:

    * `none` - Node is read from the filesystem at every access.
    * `all` (default) - All nodes are cached.

      :param nodePath: A metric name

      :returns: :class:`CeresNode` or `None`
    """
    if self.nodeCachingBehavior == 'all':
      if nodePath not in self.nodeCache:
        fsPath = self.getFilesystemPath(nodePath)
        if CeresNode.isNodeDir(fsPath):
          self.nodeCache[nodePath] = CeresNode(self, nodePath, fsPath)
        else:
          return None

      return self.nodeCache[nodePath]

    elif self.nodeCachingBehavior == 'none':
      fsPath = self.getFilesystemPath(nodePath)
      if CeresNode.isNodeDir(fsPath):
        return CeresNode(self, nodePath, fsPath)
      else:
        return None

    else:
      raise ValueError("invalid caching behavior configured '%s'" % self.nodeCachingBehavior)