优化InternalCacheProvider初始化判断逻辑