Save and restore cache keys

This will prevent caching of nested requires