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/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---