Google Groups Home
Help | Sign in
Message from discussion GSoC 2007 - Object-Level Caching
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Paul Collier  
View profile
 More options May 29 2007, 3:37 am
From: Paul Collier <pach...@gmail.com>
Date: Tue, 29 May 2007 07:37:50 -0000
Local: Tues, May 29 2007 3:37 am
Subject: GSoC 2007 - Object-Level Caching
Hello all!

Continuing with the string of posts regarding this year's GSoC, I'm
pleased to be working on new caching functionality for Django's ORM
under the mentorship of Gary Wilson[1]! Big thanks to him and all the
people from the community who made this possible. Now I've just got to
hold up my end of the bargain ;)

An updated version of my original proposal is available on Django's
wiki[2] and the project repository is available from Google Project
Hosting[3].

This project aims to condense common caching idioms into simple
QuerySet methods that deal with cached data intelligently, refill
expired cache, track instance modification/deletion, descend through
relationships, and so on. I've tried to make it accommodate the most
common use cases, be it dumping front-page news articles to cache or
keeping user profile data on hand when rendering a more dynamic site,
but I'd definitely love to hear about how cached data is really used
out in the field.

Currently, three QuerySet methods, .cache(), .cache_related(),
and .cache_set() handle individual, relation, and aggregate data
caching, respectively. Each can take arguments to specify options like
expiry time. Signals are registered behind the scenes to sync the
cache, and there's also a proposal for transactional caching. Generic
relations will also benefit greatly from .cache_related().

More detail is available on the wiki page, but lots of the little
issues that surround the implementation are still bouncing around in
my head; the page is going to be expanding and mutating throughout the
next few months, I'm sure. The timeline is a little underdeveloped,
for one. Comments and criticisms are always welcome!

The project itself is currently a single module which has a class
derived from QuerySet with all of the new functionality, and a little
hack to inject the .cache(), etc methods right back into QuerySet. It
also ships with a project in which I'll be writing proper tests. Some
sort of miniature cache-testing framework may be in order too.
Eventually, perhaps it'll become fit for inclusion in the Django
proper--but either way it doesn't require a huge amount of core
modification.

I'm also curious about the progress of QuerySet refactoring, which
would understandably have a huge impact on the code I'm writing.
Either way, this new code applies directly to a Django project I've
been working on for the last while, so I have the motivation to
maintain this project wherever it may go!

Thanks,
Paul Collier

[1] http://gdub.wordpress.com/
[2] http://code.djangoproject.com/wiki/ObjectLevelCaching
[3] http://code.google.com/p/django-object-level-caching/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google