Hi,

Since the release of 1.3, Django has changed the way it generates the
memcache key name.

If I was to do:
cache.set('hello', 'world', 300)

It would actually store the result as ":1:hello". Obviously, this is
because the version number is stored, along with the key prefix.

But, this inherently breaks legacy applications which share memcache values
between other webapps (e.g. php/memcache-python direct etc). It was also
incredibly frustrating to try and work out why on earth Django was seeing
the key, and another application was not.

Therefore, I would like to recommend either one of two things (a - being my
personal preference):

a) If the version number is the 'default' and there is no KEY PREFIX, then
it won't attempt to prepend the key with ":1:", instead keeping it in its
original format.

OR

b) Make it easier for users to disable this feature via config (I
understand there is an explanation of how to use 'make_key', but it's not a
very intuitive or friendly out-of-the-box approach)

It'd be interesting to hear what the core devs have to say on this, and
anyone elses thoughts.

Cal

-- 
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