1. A method for operating a flash memory controller of a flash array, the flash array (i) configured as a cache for a disk-based storage device and (ii) containing a plurality of segments, each segment containing a plurality of data blocks, the method comprising: for each of the segments, determining ones of the data blocks that are obsolete and ones of the data blocks that are cold, wherein obsolete data blocks are ones of the data blocks that are no longer needed and cold data blocks are ones of the data blocks that are not likely to be accessed; determining an aggregate number of obsolete blocks and cold blocks contained in each of the segments; selecting one or more of the segments based on the aggregate number of obsolete blocks and cold blocks contained in each of the segments; and erasing at least one of the one or more selected segments to produce one or more reclaimed segments of the flash array.