Hi Eliran, On Python 3, you can use Cloud Memorystore to provide a Redis cache. However, you can't currently share a cache between the Python 2.7 and Python 3.7 versions of the GAE. The cache will be separate, which will be an issue as you describe if you are running both Python 2 and Python 3 versions targeting the same Datastore database.
Now that Cloud NDB supports Python 2.7 in addition to Python 3.7, you could try to solve this problem by replacing your GAE NDB with Cloud NDB on Python 2.7, and then pointing it at the same Redis instance as the Python 3.7 version. Instead of sharing Memcache, you can share Redis. See the documentation for more info: https://cloud.google.com/appengine/docs/standard/python3/migrating-to-cloud-ndb On Wed, Dec 4, 2019 at 5:20 AM 'Eliran Segev' via Google App Engine < [email protected]> wrote: > Hi, we are migrating our python 2 services to python 3. > > > In python 2 we are using NDB - that uses Memcache > In python 3 we are using cloud NDB - that cannot have Memcache as cache > provider > > And now we have a problem when updating an entity from Python 3 it does > not affect the cache, and when using Python 2 we get the cached copy of > this entity. > > > Without changing python 2 code to cloud NDB, how can we solve this and > still have cache? > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/google-appengine/19ecce3c-e774-491f-a168-40b99393c651%40googlegroups.com > <https://groups.google.com/d/msgid/google-appengine/19ecce3c-e774-491f-a168-40b99393c651%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/CANtYgFLerNxFOi7-6T_9aNpJzD0KqDmoimNAJ%2Bm3PSmxTmi3uQ%40mail.gmail.com.
