Can I set different expiration time for different object in appengien memcache? Or the expiration time I provide is global for all the objects in memcache. I think that expiration time is for all memcache values, from the appengine doc : The app can specify a expiration time for valueS, a maximum amount of time the value will be available. Can someone confirm me please?
Can I set different expiration time for different object in appengien memcache? Or the
Share
You can have different expiration times for different objects in memcache
Get the cache instance via
MemcacheServiceFactory.getMemcacheService()Then use void
put(java.lang.Object key, java.lang.Object value, Expiration expires)Source: https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService#put%28java.lang.Object,%20java.lang.Object,%20com.google.appengine.api.memcache.Expiration%29