2009/5/21 风笑雪 <[email protected]>

> 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 [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