﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Frank Quednau commented on Designing the Entity Framework 2nd level cache</title><description>"Don't you mean inversely?"
  
nope, I merely assumed a relationship without specifying its kind. ;)
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment14</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment14</guid><pubDate>Tue, 23 Feb 2010 14:50:18 GMT</pubDate></item><item><title>Chris commented on Designing the Entity Framework 2nd level cache</title><description>"and also assuming that easiness of an action is directly related to its complexity"  Don't you mean inversely?  You have lots of assumptions there ;)
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment13</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment13</guid><pubDate>Fri, 29 Jan 2010 14:24:41 GMT</pubDate></item><item><title>Ayende Rahien commented on Designing the Entity Framework 2nd level cache</title><description>Frank,
  
Good catch :-), but you get my drift, I assume
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment12</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment12</guid><pubDate>Thu, 14 Jan 2010 12:35:31 GMT</pubDate></item><item><title>Frank Quednau commented on Designing the Entity Framework 2nd level cache</title><description>Hmm, 6 orders of magnitude easier...If the required amount of time to accomplish task A is proportional to the involved complexity, and also assuming that easiness of an action is directly related to its complexity, and let's further assume that the constant between required amount of time and complexity is 1, a feature that is implemented in 1 minute in NH takes about a million minutes in EF, or almost 2 years.
  
  
Careful with the superlatives there :)
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment11</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment11</guid><pubDate>Thu, 14 Jan 2010 12:12:33 GMT</pubDate></item><item><title>Ayende Rahien commented on Designing the Entity Framework 2nd level cache</title><description>Denis,
  
I don't think that you understand what I have in mind. You might want to read a bit about NHibernate's 2nd level cache to understand how this works
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment10</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment10</guid><pubDate>Thu, 14 Jan 2010 11:01:48 GMT</pubDate></item><item><title>Demis Bellot commented on Designing the Entity Framework 2nd level cache</title><description>I'm not sure why you would bother implementing a cache inside an ORM. The most efficient cache is kept at the application response level (i.e. page output cache, dto response, etc). 
  
  
If for some reason you want to cache at the data level your better off using a dedicated cache service or DHT which can scale horizontally, be shared by multiple app servers, supports expiration etc.
  
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment9</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment9</guid><pubDate>Thu, 14 Jan 2010 08:09:47 GMT</pubDate></item><item><title>Ayende Rahien commented on Designing the Entity Framework 2nd level cache</title><description>Stephen,
  
EF has very few real extension points. The major one is the provider, but the problem is that by the time you reach the provider is it usually too late to do the sort of things that you want to do.
  
With NHibernate, I have many extension points, at various levels, so I can not only pick the level of granularity that I have but also the particular location for the extension. That means that extending NHibernate to do something is six orders of magnitude easier, even if I want to do something that NHibernate was never meant to do.
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment8</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment8</guid><pubDate>Thu, 14 Jan 2010 03:24:35 GMT</pubDate></item><item><title>Ayende Rahien commented on Designing the Entity Framework 2nd level cache</title><description>Rafal,
  
The problem is that the whole _idea_ of a cache is to avoid hitting the DB server.
  
Much of the perf boost is the fact that you don't have to go and hit a remote server, and DB servers tend to be awfully busy, anyway.
  
Most DBs already do what you describe, by loading stuff to memory, so that isn't an issue, but the database has to also worry about things like ACID, which is a whole different kettle of fish.
  
  
And in most apps, you DO perform a lot of repeated queries. Take this blog, for instance.
  
We have the set of queries to show this page, and the set of pages that are being used in any one time. Caching those results would be very helpful in the long run, since you have high cache hit probability.
  
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment7</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment7</guid><pubDate>Thu, 14 Jan 2010 03:20:20 GMT</pubDate></item><item><title>Stephen commented on Designing the Entity Framework 2nd level cache</title><description>Is EF not extensible or are you just unaware of its api? nhibernate would of course be easier for you considering you know a considerable amount about its guts.
  
  
Seems to me that if EF wasn't extensible then you wouldn't be able to do any of these things period.. a .. 'takes a long while but I got there' sounds more like learning the api.
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment6</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment6</guid><pubDate>Wed, 13 Jan 2010 19:49:59 GMT</pubDate></item><item><title>Rafal commented on Designing the Entity Framework 2nd level cache</title><description>Hi, I think the most natural place for caching query results is the database server, not the application. And for some reason database servers don't generally do it (at least MS SQL doesn't). The rationale is that in frequently modified tables the cache would be trashed way too often, besides it would work only if the application was sending mostly identical queries over and over, which is rarely the case.Why do you think caching query results  in application would help, especially when the cache is generic, built in db access interface?
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment5</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment5</guid><pubDate>Wed, 13 Jan 2010 19:41:49 GMT</pubDate></item><item><title>Mike Chaliy commented on Designing the Entity Framework 2nd level cache</title><description>My guess was that first one was for EfProf.
  
  
Regarding open source vs commercial product. I have had to ask this :). Actually I am facing to implement multitenancy to EF, and the only way is to use yet another plugged provider. I am just frustrated with amount of stupid classes that minimal implmentation of the provider requires. So I believe this is good candidate for sharing. Hope I will be able to share this.
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment4</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment4</guid><pubDate>Wed, 13 Jan 2010 17:03:50 GMT</pubDate></item><item><title>Ayende Rahien commented on Designing the Entity Framework 2nd level cache</title><description>Mike,
  
How will this be a second provider?
  
And I intend to make this into a commercial product
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment3</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment3</guid><pubDate>Wed, 13 Jan 2010 16:35:20 GMT</pubDate></item><item><title>Mike Chaliy commented on Designing the Entity Framework 2nd level cache</title><description>Ayende, seems that this will be your second provider. Have you considered to extract common infrastructure for them and to open source it?
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment2</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment2</guid><pubDate>Wed, 13 Jan 2010 16:17:12 GMT</pubDate></item><item><title>Ayende Rahien commented on Designing the Entity Framework 2nd level cache</title><description>Mike,
  
There are two main problems with the EF CachingProvider.
  
a) it is very invasive.
  
b) is does caching in a very brute force manner, that is, it handle all caching using the queries. Having a separate entities &amp; queries cache make the process significantly more efficient.
  
</description><link>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment1</link><guid>http://ayende.com/4364/designing-the-entity-framework-2nd-level-cache#comment1</guid><pubDate>Wed, 13 Jan 2010 16:05:33 GMT</pubDate></item></channel></rss>