Provided are a method, system, and computer program product in which an indication is received from a host application of a first minimum retention time in a cache comprising a first type of memory and a second type of memory for a first plurality of tracks, wherein the first minimum retention time is not indicated for a second plurality of tracks. Based on the first minimum retention time, a second minimum retention time is set for the first plurality of tracks for the first type of memory and a third minimum retention time is set for the first plurality of tracks for the second type of memory. A track of the first plurality of tracks is demoted from the first type of memory, in response to determining that the track is a least recently used (LRU) track in a LRU list of tracks in the first type of memory and the track has been in the first type of memory for a time that exceeds the second minimum retention time.
In additional embodiments, the first type of memory is a dynamic random access memory (DRAM) cache and the second type of memory is a storage class memory (SCM) cache, wherein the second minimum retention time is a DRAM cache minimum retention time and the third minimum retention time is a SCM cache minimum retention time.
In additional embodiments, a cache management application demotes a track of the first plurality of tracks from the SCM cache, in response to determining that the track is a least recently used (LRU) track in a LRU list of tracks in the SCM cache and the track has been in the SCM cache for a time that exceeds the SCM cache minimum retention time.