<?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>State Management</title><link>http://forums.asp.net/22.aspx</link><description>Managing ASP.NET state - ViewState, Application, Session, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=69&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: How to maintain huge number of key value pairs globally.</title><link>http://forums.asp.net/thread/3273667.aspx</link><pubDate>Fri, 03 Jul 2009 14:24:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273667</guid><dc:creator>integrasol</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273667.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=22&amp;PostID=3273667</wfw:commentRss><description>&lt;p&gt;AFAIK, the Application object uses a Hashtable for storing the key-value pairs, and it is generally very fast for accessing. Application variables are kept in memory, but when the the application is recycled so are the application variabales. You could check when accessing, re-read&amp;nbsp;the objects and restore in Application, if the application&amp;nbsp;has been recycled. Alternatively, read the objects in the Application_Start event handler in Global.asax.&lt;/p&gt;
&lt;p&gt;Otherwise, the Cache is your best bet, especially if you&amp;#39;re reading from SQL Server as the other poster, points out.&lt;/p&gt;</description></item><item><title>Re: How to maintain huge number of key value pairs globally.</title><link>http://forums.asp.net/thread/3273556.aspx</link><pubDate>Fri, 03 Jul 2009 13:05:14 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273556</guid><dc:creator>SivaPrakasamDotNet</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273556.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=22&amp;PostID=3273556</wfw:commentRss><description>&lt;p&gt;Thanks Integroasol, &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I would consider the Application level storing, but I&amp;#39;m not sure how fast the application object is liable to parse/iterate to get any particular key value is requested.Also, how far I can prevent the application object getting flushed.&lt;/p&gt;&lt;p&gt;I think, Cache will be in consistent as the data grows it flushes the data without any intemation! &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Regards&lt;/p&gt;&lt;p&gt;Siva&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to maintain huge number of key value pairs globally.</title><link>http://forums.asp.net/thread/3273458.aspx</link><pubDate>Fri, 03 Jul 2009 12:06:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273458</guid><dc:creator>malcolms</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273458.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=22&amp;PostID=3273458</wfw:commentRss><description>&lt;p&gt;If these values are for all users, then store these values in the ASP.NET Cache.&amp;nbsp; That way they&amp;#39;re accessible to all users.&amp;nbsp; So you could write a property like this:&lt;pre name="code" class="c-sharp"&gt;public Dictionary&amp;lt;int, string&amp;gt; YourValue
{
     get {
           Dictionary&amp;lt;int,string&amp;gt; values = Cache[&amp;quot;yourValue&amp;quot;] as Dictionary&amp;lt;int,string&amp;gt;;
           if(values == null)
           {
                  // retrieve values
                  Cache[&amp;quot;yourValue&amp;quot;] = values;
            }
            return values;
     }
}&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; If they&amp;#39;re coming from a SQL Server database then you can use SQL Cache deoendency.&amp;nbsp; Then SQL will notify you when the data becomes invalid then you can refresh the cache.&amp;nbsp; I wrote an article on it here:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=263"&gt;http://www.dotnetcurry.com/ShowArticle.aspx?ID=263&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: How to maintain huge number of key value pairs globally.</title><link>http://forums.asp.net/thread/3273441.aspx</link><pubDate>Fri, 03 Jul 2009 11:55:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273441</guid><dc:creator>integrasol</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273441.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=22&amp;PostID=3273441</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You say globally, so I assume this is for the entire Web application, right? If so, check out Application state, using the Application property of the page. If we&amp;#39;re talking about 50k in total that should not be a problem. &lt;a href="http://msdn.microsoft.com/en-us/library/ms178594.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms178594.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On second thought, you might want to look at caching as well, as I think you&amp;#39;re saying that there is way more than 50K, right? &lt;a href="http://msdn.microsoft.com/en-us/library/xsbfdd8c.aspx"&gt;http://msdn.microsoft.com/en-us/library/xsbfdd8c.aspx&lt;/a&gt;&lt;/p&gt;</description></item><item><title>How to maintain huge number of key value pairs globally.</title><link>http://forums.asp.net/thread/3273428.aspx</link><pubDate>Fri, 03 Jul 2009 11:48:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3273428</guid><dc:creator>SivaPrakasamDotNet</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3273428.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=22&amp;PostID=3273428</wfw:commentRss><description>&lt;p&gt;hi all, I have to query a Telecom based server based on user request on a web page. there are about 50K objects / key value pairs, that needs to be fetch from the telecom server per request. Now, I don&amp;#39;t want to fetch this huge volume of data each time from the telecom server. Insted I want to maintain these key value pairs globally available for all the web users to query. Please advice how to maintain this data in the ASP.NET application thread safe. &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>