Skip to main content

Module cached

Module cached 

Source
Expand description

Tag-keyed result cache.

Mirrors Common/IpCachedResults.hpp. Ipopt’s CachedResults<T> stores an LRU list of (dependency tags, scalar dependencies, value) tuples; on lookup it returns the value whose dependency vector matches the current tags of the depended-on TaggedObjects.

Differences from upstream:

  • We do not implement the Observer/Subject invalidation push path. Upstream uses it to mark stale entries early; correctness only requires the pull-side check at lookup time, which we keep.
  • Negative max_cache_size (= unbounded) is supported with Cache::unbounded() — same semantics as Ipopt’s negative size.

Structs§

Cache
LRU cache keyed on dependency tags + scalar dependencies. T is the cached value type (Number, a Vec<Number>, an Rc<Vector>, …). Equivalent to Ipopt::CachedResults<T>.