Created
June 27, 2017 01:23
-
-
Save linux-china/4d5dc364145a3a82677e7ede8c8fb85d to your computer and use it in GitHub Desktop.
Caffeine cache build with Kotlin
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.CacheLoader | |
import com.github.benmanes.caffeine.cache.Caffeine | |
var COMPILED_PATTERNS = Caffeine.newBuilder() | |
.maximumSize(10000) | |
.build(CacheLoader<String, Pattern> { | |
Pattern.compile(it) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment