Patent ID: 7558917

Claim:
A method, comprising: receiving a request to add a new filter to a filter table stored in an inverse query engine cache; adding the new filter to the filter table, wherein the new filter comprises a condition field, a data field, an expiration field, a filter weight field, and a permanent flag field, the permanent flag field being a Boolean field indicating that the new filter is not to be removed from the filter table during an expire cache operation or a trim cache operation; assigning a weight value in the filter weight field to the new filter based on an estimate of a size of the new filter, wherein the weight value denotes the relative size of the new filter in relation to other filters stored in the filter table of the inverse query engine; determining the filter table of a bounded size; maintaining the inverse query engine cache at or below a maximum cache size, wherein the size of the inverse query engine cache may be indicated by size of the filter table, estimate of size of the filter table, or by cache usage; wherein the inverse query engine cache comprises a control module, a cache, an add filter module, a remove filter module, a matcher, a maintainer, an expire module, a trim module, a cache weight module, a cache weight, an optimal weight, a maximum weight, a filter table, a most recently used list, and an expiration list; wherein the expiration list comprises a filter identifier including an expiration value in the expiration field; removing a filter based on an expiration time; checking the expiration value in the expiration field of a filter against a current time, in response to the expiration value is earlier than the current time, remove the filter; checking the specified period of time, removing a filter that has been stored in the filter table longer than a specified period of time; trimming the filter table upon the occurrence of the filter table reaching the maximum weight, by determining the cache weight and identifying filters to be removed and removing filters from the filter table to obtain the optimal weight; and wherein determining when a permanent flag in a filter is set, leave the filter in the filter table; wherein the inverse query engine cache is used exclusively by an inverse query engine to store filters associated therewith.