Using memcache to store obj's in google app engine.

Posted by fredrik on Stack Overflow See other posts from Stack Overflow or by fredrik
Published on 2010-04-14T11:31:45Z Indexed on 2010/04/14 12:03 UTC
Read the original article Hit count: 520

Hi,

I'm trying to use memcache to cache data retrevied from the datastore. Storing stings works fine. But can't one store an object? I get an error "TypeError: 'str' object is not callable" when trying to store with this:

pageData = PageType(page)    
memcache.add(memcacheid, pageData, 60)

I've read in the documentation that it requires "The value type can be any value supported by the Python pickle module for serializing values." But don't really understand what that is. Or how to convert pageData to it.

Any ideas?

..fredrik

© Stack Overflow or respective owner

Related posts about python

Related posts about google-app-engine