Throw error when cacheName is required but not given.