<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Data Caching</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Data Caching</description>
  <pubDate>Sat, 11 Apr 2026 09:51:25 -700</pubDate>
  <lastBuildDate>Tue, 08 Apr 2008 11:38:12 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=747</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Data Caching : Sorry for the late reply.  No,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=747&amp;PID=2787#2787</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 747<br /><strong>Posted:</strong> 08-Apr-2008 at 11:38am<br /><br />Sorry for the late reply.<DIV>&nbsp;</DIV><DIV>No, you're not doing anything wrong.&nbsp; It looks like we've got a bug in our handling of relational properties.&nbsp; In this case, since we've seen the EntityKey for CoverageIntent before, it should be in the QueryCache and we should therefore look in the EntityCache for the entity, and not go to the database.&nbsp; </DIV><DIV>&nbsp;</DIV><DIV>Thanks for pointing this out.&nbsp; I've opened a bug report for this issue.</DIV>]]>
   </description>
   <pubDate>Tue, 08 Apr 2008 11:38:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=747&amp;PID=2787#2787</guid>
  </item> 
  <item>
   <title>Data Caching : I have a query like this:     var...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=747&amp;PID=2754#2754</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=275" rel="nofollow">danielp37</a><br /><strong>Subject:</strong> 747<br /><strong>Posted:</strong> 27-Mar-2008 at 10:02pm<br /><br />I have a query like this:<DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>var</FONT></FONT><FONT size=2> member = dataset.ExecuteQueryForEntity&lt;</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Member</FONT></FONT><FONT size=2>&gt;((</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>from</FONT></FONT><FONT size=2> mem </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>in</FONT></FONT><FONT size=2> dataset.Members</P><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; where</FONT></FONT><FONT size=2> mem.MemberId == </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"754402"</P></FONT></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; select</FONT></FONT><FONT size=2> mem)</FONT><FONT size=2>);</P><DIV></DIV></pre></td></tr></table><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>and then I iterate through the Member's ActualCoverages collection and access the ActualCoverage's CoverageIntent link (CoverageIntent is a table that ActualCoverage links to).&nbsp; For Example:</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>foreach</FONT></FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>var</FONT></FONT><FONT size=2> ac </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>in</FONT></FONT><FONT size=2> member.ActualCoverages)</P><P>{</P></FONT><FONT size=2><P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>&nbsp;&nbsp;&nbsp; if</FONT></FONT><FONT size=2>(!ac.CoverageIntent.IsNullEntity)</P><P>&nbsp;&nbsp;&nbsp; {</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT size=2></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2>(!ac.CoverageIntent.Employer.IsNullEntity)</P><P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Console.WriteLine(ac.CoverageIntent.Employer.EmployerName);</FONT><FONT size=2></P><P>&nbsp;&nbsp;&nbsp; }</P><P>}</P><DIV></DIV></pre></td></tr></table><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV></DIV><DIV>&nbsp;</DIV><DIV>Several of the ActualCoverages link to the same CoverageIntent (3478c) and I was expecting that the first time that&nbsp;the CoverageIntent is accessed, it would need to go to the DB, but then subsequent requests would get it from the cache because even though we are accessing the CoverageIntent from different ActualCoverages, it is the same coverageintent and should already be in the local cache.</DIV><DIV>&nbsp;</DIV><DIV>Am I doing something wrong?&nbsp; I can see in the Trace Viewer that the same query is getting called over and over trying to get the same CoverageIntent.</DIV><DIV>&nbsp;</DIV><DIV>Thanks,</DIV><DIV>&nbsp;</DIV><DIV>Dan</DIV></FONT></DIV></FONT></DIV>]]>
   </description>
   <pubDate>Thu, 27 Mar 2008 22:02:39 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=747&amp;PID=2754#2754</guid>
  </item> 
 </channel>
</rss>