1. A method for automatically allocating space in a flash storage-based cache, the method comprising: collecting, by a computer system, an input/output (I/O) trace log for each virtual machine in a plurality of virtual machines or each virtual disk in a plurality of virtual disks; determining, by the computer system, a cache utility model for each virtual machine or each virtual disk based on the I/O trace log for the virtual machine or the virtual disk, the cache utility model defining an expected utility of allocating space in the flash storage-based cache to the virtual machine or the virtual disk over a range of different cache allocation sizes; calculating, by the computer system, target cache allocation sizes for the plurality of virtual machines or the plurality of virtual disks based on the cache utility models; and allocating, by the computer system, space in the flash storage-based cache based on the target cache allocation sizes.