public void AddTypeToCache(Type type, IList <ILookup> lookups, DateTime expiration) { lock (LockObj) { var cachedType = GetByType(type); if (cachedType == null) { cachedType = new LookupCacheItem { LookupType = type }; _cache.Add(cachedType); } cachedType.LookupCache = lookups; cachedType.Expiration = expiration; } }
public void AddTypeToCache(Type type, IList<ILookup> lookups, DateTime expiration) { lock (LockObj) { var cachedType = GetByType(type); if (cachedType == null) { cachedType = new LookupCacheItem { LookupType = type }; _cache.Add(cachedType); } cachedType.LookupCache = lookups; cachedType.Expiration = expiration; } }