public void OnItemDisable (CacheItem i) { #if DEBUG CacheItem item; if (!items.TryGetValue (i.Guid, out item)) return; EDSequence.Add (new EDSequenceEntry (CopyItem (i), EDSequenceEntryType.Disable)); #endif }
// Must ALWAYS be called with the cache write lock held CacheItem RemoveCacheItem(string key) { if (key == null) { return(null); } CacheItem ret = cache [key]; if (ret == null) { return(null); } if (timedItems != null) { timedItems.OnItemDisable(ret); } ret.Disabled = true; cache.Remove(key); return(ret); }