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 memory which you can fine-tune with cache_size
> parameter. I believe that this backend is superior to database cache
> backend in situations when you need your cache to persist.
> 
> It is too simple to start the external project, and cache backends are
> not pluggable. So, I would be glad if Django developers integrate it.
> (note: don't name the file durus.py -- it will clash with Durus
> package,  name it like durus_cache.py)
> 
> I use something like following in my settings file:
> CACHE_BACKEND = 'durus://path/to/my/cache/file?cache_size=200000'

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 allow third-party cache procedures. We could make
similar changes to what we did in the database backend to allow
third-party caches to be used without requiring core changes.

I would be against including another caching mechanism in core at this
time, but making the changes to allow third-party caches that provide
the same API as Django's core caches would be a good change to make.
That provides the best of both worlds: room for experimentation with new
systems, without adding extra code to core for something that might not
be used too frequently (and which we would have to maintain forever,
regardless).

Regards,
Malcolm

-- 
Works better when plugged in. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to