The *anything* can be side-effects all over the code so I found it
easier to deal with it in one place. Here is the code to get the
version number. Perhaps there is a simpler way.
String getAppVer() {
String sPath = System.getProperty("user.dir");
if (sPath == null) return "999999";
int nIX = sPath.lastIndexOf("/");
if (nIX < 0) return "8888888";
return sPath.substring(nIX+1);
}
Steve
On Mar 19, 1:17 pm, Jeff Schnitzer <[email protected]> wrote:
> There is a simpler solution to this: If you fetch something from
> memcache, and *anything* goes wrong, treat it as if you got back an
> empty result. The problem will eventually take care of itself.
>
> Jeff
>
> On Fri, Mar 19, 2010 at 4:19 AM, Steve Pritchard <[email protected]> wrote:
> > Thats why I used the version number string (available in the
> > System.properties) to be part of my key. I was using MemCache to
> > store path names (among other things) and it broke every time I
> > deployed.
> > Steve Pritchard
>
> > On Mar 18, 10:03 pm, John Patterson <[email protected]> wrote:
> >> No.
>
> >> On 19 Mar 2010, at 08:37, opok wrote:
>
> >> > Hi all, does memcache get clean when new version deployed and made to
> >> > be the default one?
>
> >> > --
> >> > 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
> > 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.