Catalyst-Plugin-Session-Manager
view release on metacpan or search on metacpan
lib/Catalyst/Plugin/Session/Manager/Storage/File.pm view on Meta::CPAN
sub cleanup {
my $self = shift;
my $dir = $self->{config}{storage_dir} || $DIR;
my $expires = $self->{config}{expires} || $EXPIRES;
my $prefix = $self->{config}{file_prefix} || $PREFIX;
my $file = sprintf "%s-*", $prefix;
my $glob = File::Spec->catfile($dir, $file);
unlink $_ for grep { _mtime($_) < time - $expires } glob $glob;
}
sub _mtime { (stat(shift))[9] }
1;
__END__
=head1 NAME
Catalyst::Plugin::Session::Manager::Storage::File - stores session-data with file
=head1 SYNOPSIS
( run in 0.487 second using v1.01-cache-2.11-cpan-49f99fa48dc )