2010/1/8 Nicanor Cristian <[email protected]> > On 01/08/2010 10:58 AM, Prashant Gupta wrote: > > > > 2010/1/8 nicanor.babula <[email protected]> > >> Hi everyone. >> >> How memcache works on GAE? Let me explain: >> Do I get one memcache instance per app instance or there is one >> memcache instance for all instastances of my app? >> > one instance for all app instances. > > so if one app instance does: > memcacheService.put("loggedUser", userData1); > > and later another app instance does: > (UserData) memcacheService.get("loggedUser"); > The latter instance will get the same data that the first instance put? > yeah.
> > My app uses google accounts to handle users. I am thinking that it >> might be faster reading the current user data from the memcache >> instead of calling userService.getCurrentUser(). It would be a good >> approach? > > no! memcache data is not persistent, your memcache data could be removed > any time for any reason, like limited memory, cache age, etc. I suggest you > to go through docs. > > I don't want to use it for persistence. I use the datastore for > persistence. > Once a user logs in I want to write to the memcache the logged user data in > order to read it later (during one login session). > yes you can do this but memcache doesn't guarantee to keep the data for you when you come back to see it. so, you must use a persistent storage i.e. datasore, to make sure that you will get your data back next time. what you can do is to save your data to datastore and memcache both, next time if you do not find your data in memcache you can get it from datastore and save it to memcache again for next time ! > > > > > Thanks, >> Cristian. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine for Java" group. >> To post to this group, send email to >> [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<google-appengine-java%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/google-appengine-java?hl=en. >> >> >> >> > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" 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-java?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine-java%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > >--
You received this message because you are subscribed to the Google Groups "Google App Engine for Java" 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-java?hl=en.
