refactory CacheProvider