Re: New cache backend

2007-12-25 Thread Malcolm Tredinnick
On Wed, 2007-12-26 at 14:01 +1100, Malcolm Tredinnick wrote: [...] > In general, the best way to provide something like this for the > community is to make it available as a third-party application. At the > moment, that isn't entirely simple, since the Django cache mechanism > isn't set up to al

Re: New cache backend

2007-12-25 Thread Malcolm Tredinnick
On Tue, 2007-12-25 at 13:33 -0800, Ivan Illarionov wrote: > I use custom cache backend with Django and I want to share it with > community. The code is very simple: > http://www.pastethat.com/aNWVB > > The main advantage is that it is persistent just like 'db' backend and > in the same time uses

New cache backend

2007-12-25 Thread Ivan Illarionov
I use custom cache backend with Django and I want to share it with community. The code is very simple: http://www.pastethat.com/aNWVB The main advantage is that it is persistent just like 'db' backend and in the same time uses memory which you can fine-tune with cache_size parameter. I believe th

Re: More Django optimization

2007-12-25 Thread Ivan Illarionov
I think this is because functools.partial is written as C extension. You can't get the code object from them for inspection. But you still can call them, get/set custom attributes, get the curried function as func attribute, get curried args from args attribute and curried keyword arguments from k