[appengine-java] Re: Unnecessary memcache request from jetty SessionManager?

2010-06-09 Thread dmitrygusev
Peter, you're right. So if value in memcache is not of primitive type (and it can't be of primitive type, because cache operates with objects), you can skip cache.containsKey() call and analyze result of cache.get() with equality to null. In production cache.containsKey() tooks ~20 milliseconds

[appengine-java] Re: Unnecessary memcache request from jetty SessionManager?

2010-06-08 Thread Peter Ondruska
How I understand memcache: cache.containsKey(some-key) tells you whether there is such key in memcache and cache.get(some-key) retrieves the value for key You could skip asking for existence of the key in memcache only in case you expect to return non-null values (and null being non-existent