A method and apparatus for performing classification in a hierarchical classification
system performing caching are described. In one embodiment, the method comprises
walking a classification tree in the hierarchical classification system to determine
whether an incoming flow matches a class in the classification tree, and performing
a lookup on a cache storing a data structure of multiple classes of one classification
type to compare the incoming flow with multiple classes at the same time to determine
whether the incoming flow matches one of the classes.