You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the setting session_duration in the environment file it isn't being passed through to the Cache::Memcached->set when the flush method is called.
When SessionFactory calls _flush in Dancer2::Session::Memcached it only supplies the key and value. When the Dancer2:Session::Memcached object is created $self->session_duration is set correctly, but it isn't used.
Adding an extra line that appends the exptime parameter to the $self->memcached->set(@) call makes sure the session expires at the right time, e.g.
sub _flush {
my ($self) = shift;
croak "Memcache cluster unreachable _flush"
if $self->fatal_cluster_unreachable && not keys %{$self->_memcached->stats(['misc'])};
# append session_duration if set
push @_, $self->session_duration if $self->session_duration and $#_ < 2;
return $self->_memcached->set( @_ );
}
The text was updated successfully, but these errors were encountered:
DaveSophoServices
added a commit
to DaveSophoServices/dancer2-session-memcached
that referenced
this issue
Jan 23, 2020
When using the setting session_duration in the environment file it isn't being passed through to the Cache::Memcached->set when the flush method is called.
Example environment settings:
engines:
session:
Memcached:
cookie_name: dancer2_cookie
is_http_only: 1
is_secure: 1
session_duration: 3600
memcached_servers:
- 127.0.0.1:11211
When SessionFactory calls _flush in Dancer2::Session::Memcached it only supplies the key and value. When the Dancer2:Session::Memcached object is created $self->session_duration is set correctly, but it isn't used.
Adding an extra line that appends the exptime parameter to the $self->memcached->set(@) call makes sure the session expires at the right time, e.g.
The text was updated successfully, but these errors were encountered: