Class CaffeineCacheExtension
java.lang.Object
dev.relism.flash.ext.cache.caffeine.CaffeineCacheExtension
- All Implemented Interfaces:
dev.relism.flash.extension.FlashExtension
public final class CaffeineCacheExtension
extends Object
implements dev.relism.flash.extension.FlashExtension
Installs an in-process
CacheManager backed by Caffeine.
FlashApp.create(8080)
.install(new CaffeineCacheExtension())
.scan("dev.example.api");
No configuration. Each cache declares its own size and TTL where it is built, because those are properties of what is being cached, not of the process caching it.
Caches are dropped through FlashContext.onClose(java.lang.Runnable), so a stopped app does not keep its
values alive — which matters when many apps start and stop in one JVM, as they do under test.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(dev.relism.flash.extension.FlashRegistrar<?> app, dev.relism.flash.extension.FlashContext ctx)
-
Constructor Details
-
CaffeineCacheExtension
public CaffeineCacheExtension()
-
-
Method Details
-
configure
public void configure(dev.relism.flash.extension.FlashRegistrar<?> app, dev.relism.flash.extension.FlashContext ctx) - Specified by:
configurein interfacedev.relism.flash.extension.FlashExtension
-