I use it for accurate statistics display.
Basically I have a counter of a certain kind of entities.
Whenenever I create more of them I update the counter.
The atomic action guarantees accurate statiscs for when I should
create multiple entities concurrently.
The fact that it can be sometimes wiped out is ok because then I see
it's null and not some random number
and I can just read the datastore for the accurate counter again.

You see - I never even write this memcache value to the datastore,
I'm using it prevent using the datastore at all for this counting
purpose.

On Feb 5, 1:45 pm, Dan Dubois <[email protected]> wrote:
> Hi All,
>
> What are some use cases of memcache incr & decr? I just don't see where a
> distributed atomic increment/decrement function would be useful when you
> know it could be wiped and reset at any point. People suggest periodically
> saving a memcache counter back to the datastore, but this guarantees
> nothing.
>
> Of course I can see the use of a monotonically changing distributed counter.
>
> The reason I ask is for education purposes. Why did Google engineers bother
> to implement this functionality? There must be a good rationale I am not
> aware of.
>
> Best wishes,
> Dan

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