You could even use cookies - or a combination of memcache & cookies
just incase one is not available.

On Oct 17, 10:46 pm, Sylvain <[EMAIL PROTECTED]> wrote:
> Use something like this
>
> def get_data():
>   data = memcache.get("key")
>   if data is not None:
>     return data
>   else:
>     data = self.query_for_data()
>     memcache.add("key", data, 60)
>     return data
>
> or simply : memcache.set(.....)
>
> On 17 oct, 22:33, adrian <[EMAIL PROTECTED]> wrote:
>
> > Yes that did the job.  I deleted the key before adding each time since
> > the doc is vague.
>
> > The doc says add():
>
> > "Sets a key's value, if and only if the item is not already in
> > memcache."
>
> > The word "item" is vague, it should be replaced with "key" or "value".
>
> > Thanks Sylvain.
>
> > On Oct 17, 11:57 am, Sylvain <[EMAIL PROTECTED]> wrote:
>
> > > memcache ?
--~--~---------~--~----~------------~-------~--~----~
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