In certain embodiments, an application specifies individual minimum retention times for the DRAM cache and the SCM cache, or just one overall minimum retention time for both the DRAM cache and the SCM cache. For example, in certain embodiments a database management application may indicate that indexes are to be kept in DRAM cache for 1 minute and in SCM cache for 2 minutes, or the database management application may just provide an overall minimum retention time indication to keep indexes for a minimum duration of 3 minutes in both the DRAM cache and SCM cache together (i.e., the indexes should be maintained for at least 3 minutes in aggregate in the DRAM cache and the SCM cache).
Certain embodiments provide mechanisms to keep tracks in DRAM cache for the minimum retention time indicated for the DRAM cache and in SCM cache for the minimum retention time indicated for the SCM cache, if both the DRAM minimum retention time and the SCM minimum retention time are indicated.
If only an overall minimum retention time is indicated for a track then certain embodiments retain tracks in the DRAM cache for 50% (or some other percentage) of overall minimum retention time in the DRAM cache. When demoting a track from the DRAM cache to SCM cache, the remaining minimum time for retention is computed, and the track is maintained in the SCM cache for the computed time. As a result, the DRAM cache which is smaller in size in comparison to the SCM cache is prevented from becoming fill while the overall minimum retention time indicated by an application is satisfied.