1. A method comprising: at a cache system supporting a plurality of erasure codes with different reliability and storage overhead requirements: adaptively coding at least one data block by: selecting an erasure code from the plurality of erasure codes based on at least one property of the at least one data block and information relating to a data cache of the cache system, wherein the information relating to the data cache includes cache space usage of the data cache; and encoding, utilizing at least one hardware processor, the at least one data block with the selected erasure code, wherein the encoded at least one data block is inserted into the data cache, and the encoded at least one data block results in one of increased recovery performance in the data cache, increased data redundancy in the data cache, or decreased storage overhead in the data cache.