Return cache on exceptions

Added support to return last valid cache on exception.
Initially implemented in V2, if accepted I'll implement in V1