// NOTE: Normally this is called by a callback from the cache when an item exprires. // It is required to ensure there is no memory leak because a sitemap has circular references // that need to be broken explicitly. You need to work out how to call this when the user's session // expires. protected virtual void OnCacheItemRemoved(MicroCacheItemRemovedEventArgs <T> e) { if (this.ItemRemoved != null) { ItemRemoved(this, e); } }
protected virtual void siteMapCache_ItemRemoved(object sender, MicroCacheItemRemovedEventArgs<ISiteMap> e) { // Call clear to remove ISiteMapNode object references from internal collections. This // will release the circular references and free the memory. e.Item.Clear(); }
protected virtual void siteMapCache_ItemRemoved(object sender, MicroCacheItemRemovedEventArgs <ISiteMap> e) { // Call clear to remove ISiteMapNode object references from internal collections. This // will release the circular references and free the memory. e.Item.Clear(); }