How to cache results in scala?

前端 未结 5 595
孤街浪徒
孤街浪徒 2020-12-31 01:51

This page has a description of Map\'s getOrElseUpdate usage method:

object WithCache{
  val cacheFun1 = collection.mutable.Map[Int, Int]()
  def         


        
5条回答
  •  佛祖请我去吃肉
    2020-12-31 02:36

    On the scala mailing list they sometimes point to the MapMaker in the Google collections library. You might want to have a look at that.

提交回复
热议问题