Hi Ikai,

Thanks your reply. Got it.

Because the GAE memcache has quota limitation, should I use my own
cache(singleton in my WebApp) as first level, and use memcache as
second level, then I save my quota?

On 11月12日, 上午10时37分, "Ikai L (Google)" <[email protected]> wrote:
> 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 <[email protected]> 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 [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