NAME
Dancer::Session::ElasticSearch - ElasticSearch based session engine for Dancer
SYNOPSIS
This module implements a session engine storing session variables in an ElasticSearch index.
USAGE
In config.yml
session: "ElasticSearch"
session_index: "session" # defaults to "session"
This session engine will not automagically remove expired sessions on the server, but as it's ElasticSearch you know when sessions were last updated from the in-built timestamp on documents.
METHODS
create()
Creates a new session. Returns the session object.
flush()
Write the session to ES. Returns the session object.
retrieve($id)
Look for a session with the given id.
Returns the session object if found, undef
if not.
destroy()
Remove the current session object from ES
INTERNAL METHODS
_es
Connect to ElasticSearch and returns a handle