Once the caching system and cache is in place, one common use case is to use it to enrich events. In most cases, applications are designed so that the incoming event contains the key that you'll need to access the cache. Just as you've seen previously how a database table can be incorporated into the EPN, a cache is also a first-class citizen in an OEP application. Once we've linked the cache to the CQL processor as a source, you can refer to it in the CQL in the same way that you referenced the database table in the previous section. This will allow you to join an event stream on an incoming channel with its associated cached attributes.
You will use the key attribute from the incoming data stream to join to the cache just like you would do if you were making a join between two tables in SQL.
Let's take a look at some examples. Suppose you are collecting data from various types of devices. The data stream may simply send you the device ID and the measured value...