The GAE datastore is a form of persistent data storage, in that data stored there will survive the discarding of instances of your application (GAE will discard instances in cases of low usage).
Data stored in the memory cache can survive the discarding of instances of your application, but there is no guarantee; data in the memory cache may be discarded by GAE at any time. My (Apache Wicket) web sessions are stored by GAE in both the memory cache (for speed of access) and the datastore (for guarantee of access) automatically. If you do not have much data, you could store your data in a web session - but of course this data will have session scope only - not application instance or all-application-instances scope. Since I want to store persistent data, I use the datastore. One could be clever by using queued tasks to do this somehow, but I cannot be bothered with the resultant complexity. On Oct 26, 11:22 am, yoyo <[email protected]> wrote: > Hello everyone. > > I've a issue when using my apps. > All my logics application data are in memory. > > For exemple, I've a servlet like this : > > public class MyServlet { > > /** Logic application object, create when the class is loaded by the > sandbox. */ > private static Logics myLogic = new Logics(); > > /** Handle post request */ > protected void doPost( [...]) { > myLogic.doStuff([...]); > > } > } > > The doPost method don't take 30 seconds to be execute. > > My issue is this : Few minutes after my servlet is loaded and works, > I've got a new instance of Logics. > I thing AppEngine reload my class. > > I haven't read about this kind of comportment. Maybe I haven't read the > docs enough. > > Must I use appengine api, like memcache ? > > Thanks for reading this newbie appengine developer message. > > Have a nice day. -- 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.
