1. A method, comprising: maintaining a first type of cache and a second type of cache, wherein the first type of cache is smaller in size than the second type of cache; receiving, from a host, a command to release space; determining whether to discard tracks from the first type of cache or the second type of cache based on comparing a size of a corresponding cache directory with a threshold size; in response to determining that tracks in the first type of cache have to be discarded to release the space requested by the command, synchronously discarding tracks via a synchronous discard scan process from the first type of cache, wherein the command to release the space waits for completion while the synchronous discard scan process is being executed, and wherein in response to completion of execution of the synchronous discard scan process, responding to the host that the tracks in the first type of cache have been released; and in response to determining that tracks in the second type of cache have to be discarded to release the space requested by the command, asynchronously discarding tracks via an asynchronous discard scan process from the second type of cache, wherein the command to release the space does not wait for completion while the asynchronous discard scan process is being executed, wherein prior to completion of execution of the asynchronous discard scan process, responding to the host that space release operation has been started for the second type of cache, and wherein the command to release the space fails via timeout if the command to release the space waits for the asynchronous discard scan process to complete.