Event caches hold a number of previous events for the input stream(s)/window(s).
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(cacheName, 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(cacheName, 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(cacheName)
Type: This function takes an argument of the name of the event cache variable. It then returns an integer.
Example: cacheSize(tradesCache)