Apache-Session-Browseable
view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/Store/DBI.pm view on Meta::CPAN
foreach my $f (@$index) {
$self->{insert_sth}->bind_param( $i, $session->{data}->{$f} );
$i++;
}
$self->{insert_sth}->execute;
$self->{insert_sth}->finish;
}
sub update {
my $self = shift;
my $session = shift;
$self->connection($session);
local $self->{dbh}->{RaiseError} = 1;
my $index =
ref( $session->{args}->{Index} )
? $session->{args}->{Index}
lib/Apache/Session/Browseable/Store/LDAP.pm view on Meta::CPAN
my $msg = $self->ldap->add(
$self->{args}->{ldapAttributeId} . "=$id,"
. $self->{args}->{ldapConfBase},
attrs => $attrs,
);
$self->ldap->unbind() && delete $self->{ldap};
$self->logError($msg) if ( $msg->code );
}
sub update {
my $self = shift;
my $session = shift;
$self->{args} = $session->{args};
$self->{args}->{ldapObjectClass} ||= 'applicationProcess';
$self->{args}->{ldapAttributeId} ||= 'cn';
$self->{args}->{ldapAttributeContent} ||= 'description';
$self->{args}->{ldapAttributeIndex} ||= 'ou';
my $index =
ref( $session->{args}->{Index} )
lib/Apache/Session/Browseable/Store/Patroni.pm view on Meta::CPAN
}
die $@ if $@;
return $res;
}
sub insert {
my $self = shift;
return $self->_try( 'insert', @_ );
}
sub update {
my $self = shift;
return $self->_try( 'update', @_ );
}
sub materialize {
my $self = shift;
return $self->_try( 'materialize', @_ );
}
sub remove {
lib/Apache/Session/Browseable/Store/Redis.pm view on Meta::CPAN
else {
$self->{cache}->set( $id, $session->{serialized} );
}
foreach my $i (@$index) {
my $t = $session->{data}->{$i};
next unless ( defined($t) and ( length($t) > 0 ) );
$self->{cache}->sadd( "${i}_$t", $id );
}
}
sub update {
my ( $self, $session ) = @_;
my $index =
ref( $session->{args}->{Index} )
? $session->{args}->{Index}
: [ split /\s+/, $session->{args}->{Index} ];
my $id = $session->{data}->{_session_id};
# Read old data to clean up stale index entries
my $old_raw = eval { $self->{cache}->get($id) };
( run in 2.579 seconds using v1.01-cache-2.11-cpan-5837b0d9d2c )