@classmethod<EOL><INDENT>def add_to_cache(cls, remote_info, container):  <DEDENT>
if not isinstance(container, cls):<EOL><INDENT>raise TypeError('<STR_LIT>' %<EOL>(container, cls))<EOL><DEDENT>if remote_info in cls.__remote_info_cache:<EOL><INDENT>raise KeyError('<STR_LIT>')<EOL><DEDENT>cls.__remote_info_cache[remote_info] = container<EOL>
Adds a ResourceContainer to a cache tying it to a protorpc method.

        Args:
          remote_info: Instance of protorpc.remote._RemoteMethodInfo corresponding
              to a method.
          container: An instance of ResourceContainer.

        Raises:
          TypeError: if the container is not an instance of cls.
          KeyError: if the remote method has been reference by a container before.
              This created remote method should never occur because a remote method
              is created once.