Play Framework 2.2 (scala) play.api.cache not included as standard?

大憨熊 提交于 2019-12-11 10:47:47

问题


I am using play 2.2 (scala). I can not import play.api.cache._ as it is not found. I assume that it is not included as part of the standard download? How can I enable/get it. Do I need to included it manually in SBT build profile?

Strange that an important component like caching is not included as standard.

Thanks


回答1:


That's correct. According to the migration guide:

Play cache is now split out into its own module. If you are using the Play cache, you will need to add this as a dependency. For example, in Build.scala:

val addDependencies = Seq(
   jdbc,
  cache,
  ...
)

Or if you're using build.sbt, you can add it there. cache seems to be included automatically in the generated build.sbt for new 2.2.x projects.



来源:https://stackoverflow.com/questions/21626410/play-framework-2-2-scala-play-api-cache-not-included-as-standard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!