You're right: there are no guarantees around how long an item will stay in Memcache. Memcache has two Least-Recently-Used lists of items, where if you don't read or write an item, it may be pushed off the list for space. There's a per app LRU and a global LRU for apps sharing the same memcache instance.
5 minutes seems extremely short (typical eviction time of an untouched item is on the order of magnitude of a few hours), however, and I'm fairly certain with your memory size it's probably not the local LRU. I don't have any suggestions for the moment, but perhaps you can track the hit rate with getStatistics and try to determine some patterns? http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html#getStatistics() -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Tue, Sep 27, 2011 at 2:11 AM, Peter Nees <peter.n...@unclestock.com>wrote: > My objects remain in the memcache only for about 5 minutes. I know that > there is no guarantee about the caching period, but this seems abnormal. > I've read that lack of memory could be the reason. The size of one object > is about 50K, and I typically cache less as 50 objects. > I have no flush statements in my code don't remove objects. > What can be the reason for this, or how can I look for the reason? > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/google-appengine-java/-/cn5YIIUS5AYJ. > To post to this group, send email to > google-appengine-java@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > 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 google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.