Jay, It's not necessary to create a Map of caches. The Cache object represents a single Memcache client talking to a distributed, in-memory store. There's no gain for creating separate cache client instances.
On Tue, Nov 10, 2009 at 8:38 PM, jay <jay...@gmail.com> wrote: > > Hi friends, > > I want to use different cache save different sorts of Objects, so I > create several caches in a HashMap. > > But when I debug my program, I realize only one cache in the lower > layer... > > > Is it true? > > private Map<String, Cache> caches = new HashMap<String, > Cache>(); > > > .... > > > cacheFactory = CacheManager.getInstance > ().getCacheFactory(); > > caches.put(Account.class.getSimpleName(), > cacheFactory.createCache > (Collections.emptyMap())); > caches.put(AddressBook.class.getSimpleName(), > cacheFactory.createCache(Collections.emptyMap())); > > > > -- Ikai Lan Developer Programs Engineer, Google App Engine --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---