Sets a new value and extends its expiration.

        :param value: a new cached value.

        :param timeout: a expiration timeout in milliseconds.

def set_value(self, value, timeout):
        """
        Sets a new value and extends its expiration.

        :param value: a new cached value.

        :param timeout: a expiration timeout in milliseconds.
        """
        self.value = value
        self.expiration = time.perf_counter() * 1000 + timeout