Hi Faried, Did you give this a go?
I'm curious to find out if it worked for you. Nick On 9 June 2016 at 19:37, Nickolas Daskalou <[email protected]> wrote: > Hi Faried, > > Try deleting the Memcache key which is used by NDB after you update the > Datastore entity on the Node server (FYI, NDB Memcache implementation found > here > <https://cloud.google.com/appengine/docs/python/refdocs/modules/google/appengine/ext/ndb/context> > ). > > Something like this (NOTE: below code is 100% untested): > > ================ > // Check NDB release notes in case this prefix changes, or get the latest > // value from Python SDK ( > google.appengine.ext.ndb.Context._memcache_prefix) > *var memcache_prefix = 'NDB9:';* > > // You might need to implement get_urlsafe_key() so that > // it returns the same value as NDB's key.urlsafe() > *var urlsafe_entity_key = get_urlsafe_key(key);* > > // Construct the Memcache key > *var mkey = memcache_prefix + urlsafe_entity_key;* > > // Now delete from Memcache > *memcached.delete(mkey, function(err) {* > * ...* > *});* > ================ > > Let me know if that works. > > Nick > > > On 9 June 2016 at 17:42, Faried Nawaz <[email protected]> wrote: > >> On Thursday, June 9, 2016 at 12:36:09 AM UTC+5, Christian F. Howes wrote: >>> >>> Does your node service use NDB or DB? if it is using NDB then NDB takes >>> care of flushing the cache for you when you update an object, but you have >>> to `get_by_key` in order to get the latest copy. >>> >> >> NDB is a Python API, and I believe it only works on the App Engine, not >> even with Python services on flexible environments (they're deployed on >> GCE). >> >> -- >> 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/7b703095-c63d-423a-ae53-c8519895aa06%40googlegroups.com >> <https://groups.google.com/d/msgid/google-appengine/7b703095-c63d-423a-ae53-c8519895aa06%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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/CAOj3zuAXNKZpn11Hg%2BW0V30uGHuzM1r-UKFTVu3CkYJ%3D_eh_BA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
