def set_resource(self, service_name, resource_name, to_cache):
        """
        Sets the resource class within the cache.

        :param service_name: The service a given ``Resource`` talks to. Ex.
            ``sqs``, ``sns``, ``dynamodb``, etc.
        :type service_name: string

        :param resource_name: The name of the ``Resource``. Ex.
            ``Queue``, ``Notification``, ``Table``, etc.
        :type resource_name: string

        :param to_cache: The class to be cached for the service.
        :type to_cache: class
        """
        self.services.setdefault(service_name, {})
        self.services[service_name].setdefault('resources', {})
        self.services[service_name]['resources'].setdefault(resource_name, {})
        options = self.services[service_name]['resources'][resource_name]
        classpath = self.build_classpath(to_cache.__bases__[0])

        if classpath == 'kotocore.resources.Resource':
            classpath = 'default'

        options[classpath] = to_cache
Sets the resource class within the cache.

        :param service_name: The service a given ``Resource`` talks to. Ex.
            ``sqs``, ``sns``, ``dynamodb``, etc.
        :type service_name: string

        :param resource_name: The name of the ``Resource``. Ex.
            ``Queue``, ``Notification``, ``Table``, etc.
        :type resource_name: string

        :param to_cache: The class to be cached for the service.
        :type to_cache: class