@Singleton public class CaffeineSessionStore extends Object implements Session.Store
This module comes with a Session.Store implementation. In order to use it you need to
define a cache named session in your application.conf file:
caffeine.session = "maximumSize=10"And set the
CaffeineSessionStore:
{
session(CaffeineSessionStore.class);
}
You can access to the ```session``` via name:
{
get("/", req {
Cache cache = req.require("session", Cache.class);
});
}
rnd| Constructor and Description |
|---|
CaffeineSessionStore(com.github.benmanes.caffeine.cache.Cache<String,Session> cache) |
| Modifier and Type | Method and Description |
|---|---|
void |
create(Session session) |
void |
delete(String id) |
Session |
get(Session.Builder builder) |
void |
save(Session session) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgenerateIDpublic Session get(Session.Builder builder)
get in interface Session.Storepublic void save(Session session)
save in interface Session.Storepublic void create(Session session)
create in interface Session.Storepublic void delete(String id)
delete in interface Session.StoreCopyright © 2019. All rights reserved.