Google App Engine - JCache还是Memcache API?

时间:2010-06-06 06:27:59

标签: java google-app-engine memcached jcache

使用JCache(JSR 107)或Memcache API与Google App Engine有任何优点和/或缺点吗?如果是这样,他们是什么?

1 个答案:

答案 0 :(得分:5)

使用JSR 107 定义的JCache API与使用GAE Memcache API的完全相同。也就是说,GAE Memcache API的外观和行为与Java代码中的JCache API类似。

Quoth the docs

  

App Engine Java SDK支持JCache,一种用于内存缓存的建议接口标准,作为App Engine内存缓存的接口。此接口由JSR 107描述。由于这还不是官方标准,App Engine使用net.sf.jsr107接口包提供此接口。

这意味着如果您已经拥有使用JCache的Java应用程序,或者您决定将应用程序从App Engine移开,则可以在不更改任何Memcache代码的情况下执行此操作。