Hey adriano_brasileiro, I was not able to reproduce the results you describe. This might require additional investigation which is better suited to the App Engine public issue tracker. I recommend that you file an issue there and posting a link to that issue here so that others may follow.
When doing so, please include the following: - Timestamps for when you first and last noticed this issue occurring - Does it happen only when reaching a certain load? - Are there any other modules contending with this memcache? Also, I'd suggest using the *memcache.Client().add()* rather than the static *memcache.add()*. Lastly, the code you provide suggests that *memcache.Client().get()* returns a dict but it in fact returns the value of a key <https://cloud.google.com/appengine/docs/python/refdocs/google.appengine.api.memcache#google.appengine.api.memcache.Client.get> or *None*. I look forward to seeing you issue report. On Thursday, February 9, 2017 at 11:45:16 AM UTC-5, [email protected] wrote: > > I have an application in which I use the memcache to avoid race conditions > by retrieving keys using get(..., for_cas=True) and saving using cas. > However, ever since yesterday 18:00 (GMT-02) cas is always returning False > for me. Even a code as simple as this: > > memcache.add('key', 'A') > memclient = memcache.Client() > dict = memclient.get('key', for_cas=True) > result = memclient.cas('key', 'B') > > print result > > always returns False on a clean memcache. I have tried to run this code in > different applications and result is always False. If i change the code to > use traditional get() and set(), result returns True. I havent done a > deploy in three days, so the code haven't changed as the problem started to > appear. Did something change in the sdk? > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/90595c4a-6887-40fc-b738-330221398bcc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
