Exemplo n.º 1
0
        private void CachePlugInObject(string regName, object instance)
        {
            Type objType = instance.GetType();
            bool isCache = CacheUtil.IsCacheInstance(objType);

            if (!isCache)
            {
                return;
            }
            ICacheDependency dependency = CacheUtil.GetDependency(objType, instance);

            if (dependency == null)
            {
                dependency = AlwaysDependency.Dependency;
            }

            Cache.AddCacheInstance(regName, instance, dependency, false);
        }