adding further exception handling for caching task.