1. A computer system comprising: a processor, a system memory, and a bus that couples various system components including the system memory to the processor, the system configured to perform a method comprising: constructing a cache for storing results of previously evaluated queries in a binary tree based on a cache key; constructing a cache for storing results of previously evaluated queries in a binary tree based on a cache key; searching, with a processing device, the cache for a node representing a set of previously evaluated queries that match a given record using an instance of the cache key; performing processing associated with the set of previously evaluated queries in response to finding a representative node that matches the instance of the cache key; creating a new node using the instance of the cache key in response to finding no representative node; and updating the cache by classifying the compatibility of newly registered queries with the cache key and evaluating whether compatible newly registered queries match the record.