def set(self, key, value):
        """Set a value at key and return a Future.

        :rtype: Iterable[tornado.concurrent.Future]
        """
        value_encoded = encode(value)

        if key in self.data and self.data[key] == value_encoded:
            return []

        self.data[key] = value_encoded
        return self.trigger_callbacks(key)