/// <summary>
        ///     获取缓存
        /// </summary>
        public static Func <IDependencyResolver, object[], object> GetOrSetCache(Dependency key,
                                                                                 Func <Func <IDependencyResolver, object[], object> > valueFactory)
        {
            var factory = new CompileCacheManager(key).GetValue();

            if (factory != null)
            {
                return(factory);
            }
            lock (Sync)
            {
                Update(key, (factory = valueFactory()));
            }
            return(factory);
        }
        /// <summary>
        ///     获取缓存
        /// </summary>
        public static object GetCache(Dependency key, IDependencyResolver resolver, object[] args)
        {
            var factory = new CompileCacheManager(key).GetValue();

            return(factory?.Invoke(resolver, args));
        }