Thank you, Marte. You gave me a nice way to do it, I never thought to have such a big entity group.
But I think it's no matter I lose the memcache data. If it's no longer existing in memcache or has been changed, I can rollback this transaction. I'll consider more, do some testing and decide a better way. On May 22, 3:24 am, Marte Soliza <myrtac...@gmail.com> wrote: > 2009/5/21 风笑雪 <kea...@gmail.com> > > > Before my operation, I'll create a memcache to store current time and > > editing entity's key, and timeout is about 1 minute. > > If this key already existing in memcache, simply cancel this operation. > > After the db operation, I'll check its value. If time has been changed, > > I'll raise a rollback exception. > > Note that you can not use memcache to reliably store transient information. > A cache will expire *within* the given timeout, so it will expire not later > than the timeout, but it can expire less than the timeout, depending on the > availability of the memory. > > I think what you can do is to have Blog and BlogName models. The BlogName's > key name is the name of the blog itself, and it has a property that > references a Blog instance. Then, editing the names can now be done by > simply deleting, adding, and retaining BlogName instances. You can create a > single entity group (e.g. same parent) for all the BlogName instances so > adding and deleting BlogNames can be done within a transaction. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---