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); }