Ikai,

I am not sure what you mean by Memcache instances stays up because i
tried the following code and everytime when a new jvm instance is
created, the cache instance is also created again. Below is the code i
am using, let me know if i am missing anything or not doing anything
correct.

Request comes from the following code:

MyCache _cache = MyCache.getInstance();
redirectUrl = _cache.findInCache(requestedURI);


MyCache Class:

        private static MyCache _instance;
        private Cache cache;

        public static synchronized MyCache getInstance() {
                if (_instance == null) {
                        _instance = new MyCache();
                }else{
                        log.info("Using existing cache instance and NO NEW 
Instance is
created");
                }

                return _instance;
        }

and in the constructor i am creating new cache fetching everything
from the database.

Also, i have a listener in place which tells me when the new jvm
instance is started.

Thanks,
Rahul

On May 24, 3:56 pm, "Ikai L (Google)" <[email protected]> wrote:
> Memcache instances stay up. They're shared, namespaced (security) instances
> and will more likely than not outlive the lifecycles of your application
> instances.
>
> On Sun, May 23, 2010 at 11:17 PM, Tristan <[email protected]>wrote:
>
>
>
>
>
> > Does anyone know the answer to this:
>
> > If all the JVMs are killed, does the memcache stick around or is it
> > recycled? (I know memcache expires eventually, just curious if it is
> > possible for it to carry data across JVM valley of death)
>
> > Cheers,
>
> > Tristan
>
> > --
> > 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%2B 
> > [email protected]>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-appengine-java?hl=en.
>
> --
> Ikai Lan
> Developer Relations, Google App Engine
> Twitter:http://twitter.com/ikai
> Delicious:http://delicious.com/ikailan
>
> ----------------
> Google App Engine links:
> Blog:http://googleappengine.blogspot.com
> Twitter:http://twitter.com/app_engine
> Reddit:http://www.reddit.com/r/appengine
>
> --
> 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 
> athttp://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.

Reply via email to