<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Microsoft Application Blocks</title><link>http://forums.asp.net/122.aspx</link><description>Discuss the various Patterns &amp; Practices Application Blocks for ASP.NET 1.x.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Enterprise Library 4.1 Cache and enumeration.  Can this be done?</title><link>http://forums.asp.net/thread/3179463.aspx</link><pubDate>Thu, 21 May 2009 20:38:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3179463</guid><dc:creator>skydiverMN</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3179463.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=122&amp;PostID=3179463</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m working with a project where users that login might open up another tab (IE 7, FF, etc.) and login again as another user.&amp;nbsp; My original cache issue was not having cached keys overwritten during this double login scenario.&amp;nbsp; For this I&amp;#39;m going to concatenate the userID when creating a new cache item.&amp;nbsp; This creates another issue.&amp;nbsp; How can I only remove that items with one specific user?&amp;nbsp; There doesn&amp;#39;t appear to be any way to enumerate through a list.&amp;nbsp; The CacheItem exists, but there&amp;#39;s no Cache.Items (or similar) to enumerate through using a ForEach.&amp;nbsp; Also, after instantiating the ICacheManager interface I tried to just look for an index.&amp;nbsp; See below:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;private ICacheManager appCache&lt;/p&gt;
&lt;p&gt;(in some public method....)&lt;br /&gt;typing appCache[&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;---- intellisense just pops up that it&amp;#39;s looking for&amp;nbsp;a string key.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I also tried to inherit from the IEnumerate&amp;lt;&amp;gt;, but I&amp;#39;m not sure&amp;nbsp;exactly how this&amp;#39;ll work.&amp;nbsp; &amp;nbsp;Is there a way to extend the EntLib cache to enumerate through?&lt;/p&gt;</description></item></channel></rss>