Added clearing to cache with fail