如何将List <entity>附加或放入GAE memcache编程语言Java?</entity>

时间:2012-11-23 11:22:00

标签: java google-app-engine google-cloud-datastore

示例:

  Query departQuery = pm.newQuery(Department.class);
  List <Department> departList = List<Department>) departQuery.execute();

我可以知道如何将departList(List)添加到memcache中。

1 个答案:

答案 0 :(得分:0)

您可以将JCache用于App Engine。使用子类(例如List)而不是ArrayListdepartListSerializable,然后您可以:

cache.put(yourkey, departList)