The docs for set_multi, explain the key_prefix and namespace arguments
pretty well.
http://code.google.com/intl/nl/appengine/docs/python/memcache/functions.html#Client_set_multi

delete_multi works just like get_multi and set_multi.  You can't
delete all "K*" , unless you know all the keys.


Robert




from google.appengine.api import memcache

vals = {'a': 1, 'b': 2}
memcache.set_multi(vals)
print memcache.get_multi(['a', 'b'])


vals = {'a': 43, 'b': 44}
memcache.set_multi(vals, key_prefix='test-')
print memcache.get_multi(['a', 'b'], key_prefix='test-')
print memcache.get_multi(['test-a', 'test-b'])

vals = {'a': 99, 'b': 98}
memcache.set_multi(vals, namespace='test')
print memcache.get_multi(['a', 'b'], namespace='test')






On Tue, Sep 21, 2010 at 11:31, saintthor <[email protected]> wrote:
> how to use key_prefix and namespace params in memcache *_multi
> functions?
>
> can any one give me an example?
>
> if i have keys as K1,K2...Kxxx in memcache, can i delete K* by
> function delete_multi?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine" 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/google-appengine?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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/google-appengine?hl=en.

Reply via email to