If at block 812 it is determined that the difference of the current time 138 from the timestamp of the track is not greater than the minimum retention time of the track (i.e., the track has not been in the DRAM cache for a time that exceeds the minimum retention time) [“No” branch 820] control proceeds to block 822 to determine whether the track should be demoted to prevent the DRAM cache 112 from becoming full.
At block 822 the cache management application 116 determines whether there are too many tracks with minimum retention time or too few tracks that are eligible for demotion from the cache that may cause the cache to become full. What is “too many” and what is “too few” is determined based on certain predetermined conditions, where some exemplary predetermined conditions are described later.
If at block 822 the cache management application 116 determines that there are too many tracks with minimum retention time or too few tracks that are eligible for demotion from the DRAM cache that may cause the DRAM cache to become full (“Yes” branch 824) then control proceeds to block 816 in which the track is demoted and the number of minimum retention time tracks is decremented (at block 818).