Verify the cache table exists before cache invalidation.

#6803