1. A data storage system, comprising: a back-end interface to physical storage including flash memory; a front-end interface to a communications network coupling the data storage system to one or more host computers; and a storage processor, the storage processor having memory including battery-backed DRAM, the storage processor being configured to execute computer program instructions to cause the data storage system to provide data storage services to the host computers using the physical storage by: defining a layered operating stack including a file system layer, a file cache layer, and a unified cache layer, the unified cache layer providing a unified cache of data blocks including page descriptors each capable of referencing a data block stored in either or both the DRAM or/and the flash memory, the unified cache layer including a reference structure associating file references at the file cache layer with corresponding page descriptors for file data blocks occupying the unified cache; and by the unified cache layer, managing use of the memory for caching data blocks of files being written at the file system layer and cached by the file cache layer, the managing including operations of allocation, access, and eviction/destaging, the allocation operation establishing associative references in the reference structure for data blocks upon initial caching, the access operation using the reference structure to locate cached data blocks based on file references, and the eviction/destaging operation relocating cached data blocks to create room for caching other data blocks, the relocating including a first-level destaging of data blocks from the DRAM to the flash memory at a first time and a second-level destaging of data blocks from the flash memory to the physical storage at a later second time, the first-level destaging maintaining existing associative references and modifying existing page descriptors to add respective references to the flash memory.