Created
September 17, 2018 20:56
-
-
Save stasimus/08fd1141910a1e395e06884ac1c4e49d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.github.benmanes.caffeine.cache.Caffeine | |
import scala.concurrent.duration.Duration | |
import scalacache._ | |
import scalacache.caffeine.CaffeineCache | |
object CacheApp extends App { | |
val intCache: Cache[Int] = new CaffeineCache[Int](Caffeine.newBuilder().build[String, Entry[Int]]()) with Predicate[Int] { | |
override def shouldCache: Int => Boolean = _ > 0 } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment