citronic
citronic

Reputation: 10168

how do I return all memcached values in Google App Engine?

I want to use all the data in my python app engine memcache. I do not know the keys in advance.

How do I go about getting all data?

Upvotes: 4

Views: 3548

Answers (3)

vivekv
vivekv

Reputation: 2298

I am using a 'well known key' called "config" where I store a list of all other keys and use that to enumerate the rest of the items.

Upvotes: 1

systempuntoout
systempuntoout

Reputation: 74104

The only read functions available on memcache are:

get(key, namespace=None)

get_multi(keys, key_prefix='', namespace=None)

As you can see, to get data from memcache you must provide one or more keys.

Upvotes: 4

citronic
citronic

Reputation: 10168

as in comments above, I guess I could stick all data in a single memcache entry with a known key.

Still for non-static data there are scenarios where it would be useful.

Upvotes: 0

Related Questions