<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Caching Layer for Django ORM</title>
	<atom:link href="http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html</link>
	<description>A blog about Django, JavaScript, CSS, and general web development.</description>
	<pubDate>Mon, 08 Sep 2008 11:21:32 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: John</title>
		<link>http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-18365</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 28 Feb 2008 21:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-18365</guid>
		<description>I had some difficulty getting this to work out of the box with the OneToOneRelation (I know it's not exactly in wide use, but until I have model-inheritance, it's the best fit for several aspects of my data model), and with Generic Relations.

After a couple tweaks to the code to get it to run (which could very well have broken it), I was finding on average the number of queries required to generate my pages went down by 1-3, and the effect was negligible.  For this test, I simply changed all of my models to inherit from CachedModel instead of models.Model.</description>
		<content:encoded><![CDATA[<p>I had some difficulty getting this to work out of the box with the OneToOneRelation (I know it&#8217;s not exactly in wide use, but until I have model-inheritance, it&#8217;s the best fit for several aspects of my data model), and with Generic Relations.</p>
<p>After a couple tweaks to the code to get it to run (which could very well have broken it), I was finding on average the number of queries required to generate my pages went down by 1-3, and the effect was negligible.  For this test, I simply changed all of my models to inherit from CachedModel instead of models.Model.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16920</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 24 Jan 2008 00:49:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16920</guid>
		<description>We did tests showing a 2x-5x increase in time for a standard cache call of 10-50 objects. It will be a little bit higher of course with the overhead of iterating through loops, but all in all it's going to provide a means of invalidation and still be far more efficient than SQL.</description>
		<content:encoded><![CDATA[<p>We did tests showing a 2x-5x increase in time for a standard cache call of 10-50 objects. It will be a little bit higher of course with the overhead of iterating through loops, but all in all it&#8217;s going to provide a means of invalidation and still be far more efficient than SQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al</title>
		<link>http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16884</link>
		<dc:creator>Al</dc:creator>
		<pubDate>Tue, 22 Jan 2008 11:46:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16884</guid>
		<description>David,

While I expect you haven't done any in depth performance testing - have you given it any sort of a work out to give some sort of an indication of the possible benefits this is going to yield for you?

Al.</description>
		<content:encoded><![CDATA[<p>David,</p>
<p>While I expect you haven&#8217;t done any in depth performance testing - have you given it any sort of a work out to give some sort of an indication of the possible benefits this is going to yield for you?</p>
<p>Al.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16877</link>
		<dc:creator>David</dc:creator>
		<pubDate>Tue, 22 Jan 2008 06:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16877</guid>
		<description>One quick note is that I haven't actually put much thought into optimizing counts. And it currently doesn't invalidate them.</description>
		<content:encoded><![CDATA[<p>One quick note is that I haven&#8217;t actually put much thought into optimizing counts. And it currently doesn&#8217;t invalidate them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Oberst</title>
		<link>http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16876</link>
		<dc:creator>Jan Oberst</dc:creator>
		<pubDate>Tue, 22 Jan 2008 05:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.davidcramer.net/code/73/caching-layer-for-django-orm.html#comment-16876</guid>
		<description>I like this a lot! When I started developing my django app most pages made like 50 seperate foreign key requests each for a single ID to the database. I even had queries for the same ID.

Because I really have to focus on DB speed I can't use Django's select_related function. That's why I'm now caching foreign key lookups with memcache get_many calls (Just hacked this code direclty editing Django sources for now).

I had most problems with foreign key lookups and obviously count() queries - and it's amazing to have Django's ORM to manage all that caching transparently behind the scenes. Great job!</description>
		<content:encoded><![CDATA[<p>I like this a lot! When I started developing my django app most pages made like 50 seperate foreign key requests each for a single ID to the database. I even had queries for the same ID.</p>
<p>Because I really have to focus on DB speed I can&#8217;t use Django&#8217;s select_related function. That&#8217;s why I&#8217;m now caching foreign key lookups with memcache get_many calls (Just hacked this code direclty editing Django sources for now).</p>
<p>I had most problems with foreign key lookups and obviously count() queries - and it&#8217;s amazing to have Django&#8217;s ORM to manage all that caching transparently behind the scenes. Great job!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
