Event caches hold a number of previous events for the input stream or streams to a derived streams.
Syntax: expireCache(events, seconds)
Type: The first argument must name an event cache variable. The second argument must be an integer. The function returns the event cache.
Example: expireCache(events, 50)
Syntax: insertCache(events, record)
Type: The first argument must name an event cache variable. The argument must be a record type. The function returns the record inserted.
Example: insertCache(events, inputStream)
Syntax: keyCache(events, event)
Type: The first argument must name an event cache variable. The second argument must be a record type. The function returns the same record.
Example: keyCache(ec1, rec)
Syntax: getCache(cache, index)
Type: The first argument must name an event cache variable. The second argument must be an integer specifying the row to retrieve. The function returns the specified row of the cache.
Example: getCache(tradesCache, 3)
Syntax: deleteCache(cache, index)
Type: The first argument must name an event cache variable. The second argument must be an integer specifying the row to delete. The function deletes the specified row; it does not return any output.
Example: deleteCache(tradesCache, 0)
Syntax: cacheSize()
Type: This function takes no arguments. It returns an integer.
Example: cacheSize()