摘要 |
Disclosed is a technique for managing memory items in a cache. An "age-lock" parameter is set to protect the newer memory items. When an incoming memory item (such as a history block header) is to be added to the cache, the amount of free space in the cache is checked. If there is insufficient free space for the incoming memory item, then space is freed up by removing memory items from the cache. No memory items protected by the age-lock parameter are removed. Of the older items, the selection for removal follows any of a number of well know cache management techniques, such as the "least recently used" algorithm. A "maximum size" parameter can be set for the cache. If the cache exceeds this maximum size, then free space is released and memory items are removed to decrease the cache size.
|