Add cache support & auto recovery