Patent attributes
Methods and apparatus for removing data from a cache are disclosed. The data may be one or more objects that are stored in a first cache. Each object stored in the first cache has an associated reference that is stored in a second cache. Each such reference has an associated timer. As a program accesses an object stored in the first cache, the timer associated with its reference is reset. A harvester process parses through the second cache over a period of time, locking a section of the second cache and determining if any timers associated with references therein have timed out. The harvester process removes any such timed-out timers from the second cache. A garbage collection process parses through the first cache, removing any objects therein that do not have an associated reference in the second cache.