cache element key
cache element creation time
the index of the cache item that corresponds to the newly registered cache element or a value of at least length if realtime is disabled and time is less than the time value of the most recent cache element.
In: If realtime is enabled, time must bebe at least the time value of the most recent cache element.
Out: If realtime is enabled, the returned index is below length.
Registers a new cache element and obtains the cache item index for it. If the cache is full, the oldest cache element is replaced. If realtime is enabled, time is expected to be at least the time value of the most recent cache element. If realtime is disabled and time is less than the time value of the most recent cache element, nothing is done and a value of at least length is returned.