Cache replacement method and system
The invention discloses a cache replacement method and system and belongs to the technical field of computer cache. According to the cache replacement method, an array is used for storing cache data items, the positions of the cached data items in the array are stored through a hash table, an access...
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention discloses a cache replacement method and system and belongs to the technical field of computer cache. According to the cache replacement method, an array is used for storing cache data items, the positions of the cached data items in the array are stored through a hash table, an access frequency counter is designed for each cache data item, the cache data items are organized by using a min heap data structure, and the cache data items are sequenced according to counting results of the access frequency counters, wherein heap data is the cache data items with the lowest access frequency; when a data access request exists, if the data hits the cache data items, the number of the access frequency counters of the cache data items is increased by one, and the cache data items are re-sequenced; if the data does not hit the cache data items, the heap cache data items are eliminated, and a new cache data item is created. The cache replacement method can quickly determine the data items with the lowest ac |
---|