Commit d556acd committed Dec 3, 2024 · 1 / 1 · Verified
1 parent a86cbda commit d556acd Copy full SHA for d556acd
File tree 1 file changed +11
-0
lines changed
aedile-core/src/test/kotlin/com/sksamuel/aedile/core
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,17 @@ class AsCacheTest : FunSpec() {
93
93
cache.getIfPresent(" wibble" ) shouldBe null
94
94
}
95
95
96
+ test(" should support invalidateAll" ) {
97
+ val cache = Caffeine .newBuilder().asCache<String , String >()
98
+ cache.put(" wibble" , " wobble" )
99
+ cache.put(" bibble" , " bobble" )
100
+ cache.getIfPresent(" wibble" ) shouldBe " wobble"
101
+ cache.getIfPresent(" bibble" ) shouldBe " bobble"
102
+ cache.invalidateAll()
103
+ cache.getIfPresent(" wibble" ) shouldBe null
104
+ cache.getIfPresent(" bibble" ) shouldBe null
105
+ }
106
+
96
107
test(" should support contains" ) {
97
108
val cache = Caffeine .newBuilder().asCache<String , String >()
98
109
cache.put(" wibble" , " wobble" )
You can’t perform that action at this time.
0 commit comments