Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine - JCache or Memcache API?

Are there any advantages and/or disadvantages to using either JCache (JSR 107) or the Memcache API with Google App Engine? If so, what are they?

like image 496
Taylor Leese Avatar asked Jun 06 '10 06:06

Taylor Leese


1 Answers

Using the JCache API as defined by JSR 107 is exactly the same as using the GAE Memcache API. That is, the GAE Memcache API looks and act just like the JCache API in your Java code.

Quoth the docs:

The App Engine Java SDK supports JCache, a proposed interface standard for memory caches, as an interface to the App Engine memcache. This interface is described by JSR 107. Since this is not yet an official standard, App Engine provides this interface using the net.sf.jsr107 interface package.

This means that if you've already got a Java app that uses JCache, or should you decide to move your app off of App Engine, you can do it without changing any of your Memcache code.

like image 101
Jason Hall Avatar answered Oct 23 '22 11:10

Jason Hall