NAME
MojoX::Authentication::Model::SAML2::Hash
SYNOPSIS
use MojoX::Authentication::Model::SAML2::Hash;
my $cache = MojoX::Authentication::Model::SAML2::Hash;
my $data = {...};
$cache->set($data, $key, $expiration_time);
my $data_out = $cache->get($key);
$cache->wipe($key);
DESCRIPTION
Cache for data, based on a hash local to the process.
This is the default cache for MojoX::Authentication::Model::SAML2. As data is not shared among processes, it is only suitable for applications running as a single process; with hypnotoad, the prefork command or any other multi-process setup, use MojoX::Authentication::Model::SAML2::Db instead (see "create" in MojoX::Authentication::Model::SAML2).
INTERFACE
get
my $data = $cache->get($key);
Retrieve an object from the cache, by key.
new
my $cache = MojoX::Authentication::Model::SAML2::Hash->new;
Constructor for an object.
set
$cache->set($data, $key, $expiration_time);
Set an element in the cache, with expiration time (expressed as an epoch). Every call also removes the entries that have already expired, so that abandoned logins do not pile up.
wipe
$cache->wipe($key);
Permanently remove an item from the cache.
ANYTHING ELSE (INCLUDING AUTHOR, COPYRIGHT AND LICENSE)
See documentation for MojoX::Authentication.