1. A method comprising: making write allocation decisions for a cache implemented as non-volatile solid-state storage in a storage system, by executing a cache replacement algorithm that concurrently applies cache hit optimization and wear optimization for the cache; and writing to locations in the cache according to the write allocation decisions.