Re: Call to Arms -- Caching Mechanisms

2007-09-16 Thread msaelices
Anybody has testing the performance of new improvements in session storage? In changeset http://code.djangoproject.com/changeset/6333 was implementing session backends for filesystem and memcached. This might improve performance of a site, freeing database for hard work. On 15 sep, 03:22, David C

Re: Call to Arms -- Caching Mechanisms

2007-09-15 Thread David Cramer
We'd also need to factor in a way to pull data from it on ForeignKeys/ etc. For example: I have CachedModel() and a ForeignKey(CachedModel). Now, if an option was enabled, say "cache_all_rows", we'd store all rows in our cache backend, so all .get()'s on pks, and .all() would pull from that. Whe

Re: Call to Arms -- Caching Mechanisms

2007-09-15 Thread David Cramer
That's actually not quite caching. That's just optimizing memory usage. Here's my proposal: * Create a custom ModelBase, CachedModelBase -- this would rely on CACHE_BACKEND to pull get() requests (PK requests) using a similar method as #17s optimization * CachedModelBase overrides save/delete to

Re: Call to Arms -- Caching Mechanisms

2007-09-15 Thread Philippe Raoult
I'm too wasted to write a coherent answer, but I'd like to point out that http://code.djangoproject.com/ticket/17 has a patch for caching that has been refactored during the sprint. Regards, Philippe --~--~-~--~~~---~--~~ You received this message because you are

Re: Call to Arms -- Caching Mechanisms

2007-09-15 Thread Honza Král
On 9/15/07, msaelices <[EMAIL PROTECTED]> wrote: > > Oh! beautiful code! could you paste Dependency model besides? Thanks, the dependency model is the part I am least satisfied with: http://dpaste.com/19694/ it gets created automatically whenever and object is used within other object's box > > >

Re: Call to Arms -- Caching Mechanisms

2007-09-15 Thread msaelices
Oh! beautiful code! could you paste Dependency model besides? On 15 sep, 03:41, "Honza Král" <[EMAIL PROTECTED]> wrote: > we use something likehttp://dpaste.com/19671/ > > it > - invalidates the cache when object is updated (based on registered test) > - can cooperate with apache active mq

Re: Call to Arms -- Caching Mechanisms

2007-09-14 Thread David Cramer
CacheManager: http://dpaste.com/19672/ CachedForeignKey: from django.core.cache import cache from django.db.models.fields import Field from django.db.models.fields.related import ForeignKey, ReverseSingleRelatedObjectDescriptor CACHE_TIME = 60*60 class CachedReverseSingleRelatedObjectDescriptor(

Re: Call to Arms -- Caching Mechanisms

2007-09-14 Thread Honza Král
we use something like http://dpaste.com/19671/ it - invalidates the cache when object is updated (based on registered test) - can cooperate with apache active mq to propagate the signals accross multiple boxes - provides decorator for any function, including handling the invalidation registr

Call to Arms -- Caching Mechanisms

2007-09-14 Thread David Cramer
So in the past months, we've tried several different methods of handling caching over at Curse. Curse.com for the unfamiliar, we're a very high traffic dynamic content driven website. - Caching frequently used querysets with cache.get()/set() - Caching entire views - Caching middleware Now we've