1. A method comprising: in response to determining that data is clean: generating error detection information associated with the data to be stored at a cache; and storing the data at a first region of the cache; and in response to determining that the data is dirty: generating error correction information associated with the data to be stored at the cache; and storing the data at a second region of the cache.