code: def add_to_cache(self, cache_id, inputs, output):
          
          self.inputs_changed[cache_id] = False
          self.cached_outputs[cache_id] = output
          self.order.append(cache_id)
          self.cached_inputs[cache_id] = inputs
          for a in inputs:
              if a is not None and not isinstance(a, Number) and not isinstance(a, str):
                  ind_id = self.id(a)
                  v = self.cached_input_ids.get(ind_id, [weakref.ref(a), []])
                  v[1].append(cache_id)
                  if len(v[1]) == 1:
                      a.add_observer(self, self.on_cache_changed)
                  self.cached_input_ids[ind_id] = v
docs: This adds cache_id to the cache, with inputs and output