code: def on_cache_changed(self, direct, which=None):
          
          for what in [direct, which]:
              ind_id = self.id(what)
              _, cache_ids = self.cached_input_ids.get(ind_id, [None, []])
              for cache_id in cache_ids:
                  self.inputs_changed[cache_id] = True
docs: A callback funtion, which sets local flags when the elements of some cached inputs change
  
          this function gets 'hooked up' to the inputs when we cache them, and upon their elements being changed we update here.