List Info

Thread: memcached backed




memcached backed
user name
2007-01-28 20:08:57
why doesn't the memcached backend support 'replace'?
thanks
mark


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: memcached backed
user name
2007-01-29 10:54:04
On 1/28/07 8:08 PM, rkmr.emgmail.com wrote:
> why doesn't the memcached backend support 'replace'?

I'm not sure what you mean::

	>>> cache.set("key", "val1")
	>>> cache.get("key")
	"val1"
	>>> cache.set("key", "val2")
	>>> cache.get("key")
	"val2"

Isn't that "replace"?

Jacob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: memcached backed
user name
2007-01-29 21:31:59
I think Mark is referring to the actual 'replace'
functionality of
memcached. From http://www.danga.com/
memcached/

replace -- sets in the cache only if the key already exists

As opposed to:

set -- unconditionally sets a given key with a given value

Isaac


On 1/29/07, Jacob Kaplan-Moss <jacobjacobian.org> wrote:
>
> On 1/28/07 8:08 PM, rkmr.emgmail.com wrote:
> > why doesn't the memcached backend support
'replace'?
>
> I'm not sure what you mean::
>
>         >>> cache.set("key",
"val1")
>         >>> cache.get("key")
>         "val1"
>         >>> cache.set("key",
"val2")
>         >>> cache.get("key")
>         "val2"
>
> Isn't that "replace"?
>
> Jacob
>
> >
>


-- 
Random Geek Stuff: http://l0wbyt3.blogspot.c
om

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: memcached backed
user name
2007-01-30 11:16:18
On 1/29/07 9:31 PM, Isaac Sparrow wrote:
> I think Mark is referring to the actual 'replace'
functionality of
> memcached. From http://www.danga.com/
memcached/
> 
> replace -- sets in the cache only if the key already
exists
> 
> As opposed to:
> 
> set -- unconditionally sets a given key with a given
value

Ah, I see.

Django's cache only implements a minimal subset of functions
-- those 
supported by *all* cache backends.  You can always interact
with the memcached 
directly if you need "replace" (though frankly I
can't see why...)

Jacob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: memcached backed
user name
2007-01-30 14:03:14


On Jan 30, 12:16 pm, Jacob Kaplan-Moss <j...jacobian.org> wrote:

> Django's cache only implements a minimal subset of
functions -- those
> supported by *all* cache backends.  You can always
interact with the memcached
> directly

For example we clear memcached like this:
  from django.core.cache import cache
  cache._cache.flush_all()



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )