Architectural Techniques For Managing Non-volatile Caches