A middle-tier
Web server with a queryable cache that contains items from one or more data sources. Items are included in the cache on the basis of the probability of future hits on the items. When the
data source determines that an item that has been included in the cache has changed, it sends an update message to the
server, which updates the item if it is still included in the cache. In a preferred embodiment, the
data source is a
database system and triggers in the
database system are used to generate update messages. In a preferred embodiment, the
data access layer determines whether a data item required by an application program is in the cache. If it is, the
data access layer obtains the item from the cache; otherwise, it obtains the item from the
data source. The queryable cache includes a miss table that accelerates the determination of whether a data item is in the cache. The miss table is made up of miss table entries that relate the status of a data item to the query used to access the data item. There are three statuses: miss, indicating that the item is not in the cache, hit, indicating that it is, and unknown, indicating that it is not known whether the item is in the cache. When an item is referenced, the query used to access it is presented to the table. If the entry for the query has the status miss, the
data access layer obtains the item from the data source instead of attempting to obtain it from the cache. If the entry has the status unknown, the
data access layer attempts to obtain it from the cache and the miss table entry for the item is updated in accordance with the result. When a copy of an item is added to the cache, miss table entries with the status miss are set to indicate unknown.