Updated cache_validation exception handler to catch all types of exceptions