Sharing dedicated memcache across different modules of an app engine app

42 views
Skip to first unread message

Soeren Balko

unread,
Feb 19, 2017, 9:49:34 PM2/19/17
to Google App Engine
We observed a strange (and difficult to reproduce) phenomenon when looking up an integer value in memcache from different modules (recently renamed into "services" by Google) of the same GAE app. That is, in one module, we get back the correct value in the other module, we get back 0. Obviously, a memcache lookup can always result in returning None (Python) - but a return value of 0 indicates that a value (0) is found, no?

There are a couple of patterns we use:

- We use the dedicated memcache service
- In module 1, we progressively increment the value using memcache.incr(...)
- The lookup in module 1 is also returning the correct result
- Module 2 has not updated the value before, but is merely reading it from the cache, which results in 0

We tried finding any statements from Google concerning how the memcache service behaves when it is accessed from different modules/services, but were not able to find any clues. We understand that the memcache content is not shared across different apps, but do assume that it is shared among modules/services of the same app.

Has anyone experienced something similar?

Thank you,
Soeren

Jordan (Cloud Platform Support)

unread,
Feb 20, 2017, 3:19:09 PM2/20/17
to Google App Engine
Since Google Groups is meant for general product discussions, your coding question would be best posted on Stack Overflow. I recommend you also supply your actual code for both services, as using Namespaces can cause this.  
Reply all
Reply to author
Forward
0 new messages