.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Catalyst::Plugin::Session::Store::FastMmap 3pm" .TH Catalyst::Plugin::Session::Store::FastMmap 3pm "2022-06-09" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Catalyst::Plugin::Session::Store::FastMmap \- FastMmap session storage backend. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Catalyst qw/Session Session::Store::FastMmap Session::State::Foo/; \& \& MyApp\->config( \& \*(AqPlugin::Session\*(Aq => { \& expires => 3600, \& storage => \*(Aq/tmp/session\*(Aq \& }, \& ); \& \& # ... in an action: \& $c\->session\->{foo} = \*(Aqbar\*(Aq; # will be saved .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Catalyst::Plugin::Session::Store::FastMmap\*(C'\fR is a fast session storage plugin for Catalyst that uses an mmap'ed file to act as a shared memory interprocess cache. It is based on Cache::FastMmap. .SS "\s-1METHODS\s0" .IX Subsection "METHODS" .IP "get_session_data" 4 .IX Item "get_session_data" .PD 0 .IP "store_session_data" 4 .IX Item "store_session_data" .IP "delete_session_data" 4 .IX Item "delete_session_data" .IP "delete_expired_sessions" 4 .IX Item "delete_expired_sessions" .PD These are implementations of the required methods for a store. See Catalyst::Plugin::Session::Store. .IP "get_and_set_session_data" 4 .IX Item "get_and_set_session_data" This is the optional method for atomic write semantics. See Catalyst::Plugin::Session::AtomicWrite. .IP "setup_session" 4 .IX Item "setup_session" Sets up the session cache file. .SH "CAVEATS" .IX Header "CAVEATS" Very loaded sites with lots of data in the session hash may have old sessions expired prematurely, due to the \s-1LRU\s0 caching policy employed by Cache::FastMmap. To get around this you can increase the \f(CW\*(C`cache_size\*(C'\fR parameter, or switch session storage backends. Cache::FastMmap defaults to around 5mb (89 * 64k). .PP This is particularly inappropriate for use as a backend for e.g. Catalyst::Plugin::Session::PerUser, for example. .PP As Cache::FastMmap is not \*(L"thread-safe\*(R" (at least version 1.30 and before) therefore also this module does not work in multi-threaded environment. It is \*(L"fork-safe\*(R", however keep in mind that on Win32 the perl \*(L"fork\*(R" call is implemented as an emulation via threads \- that is the reason why you cannot use this store for example when running you catalyst application on Win32 platform with Catalyst::Engine::HTTP::Prefork engine. .SH "CONFIGURATION" .IX Header "CONFIGURATION" These parameters are placed in the hash under the \f(CW\*(C`Plugin::Session\*(C'\fR key in the configuration hash. .IP "storage" 4 .IX Item "storage" Specifies the file to be used for the sharing of session data. The default value will use File::Spec to find the default tempdir, and use a file named \&\f(CW\*(C`MyApp_session_data\*(C'\fR, where \f(CW\*(C`MyApp\*(C'\fR is replaced with the appname. .Sp Note that the file will be created with mode 0640, which means that it will only be writeable by processes running with the same uid as the process that creates the file. If this may be a problem, for example if you may try to debug the program as one user and run it as another, specify a filename like \f(CW\*(C`/tmp/session\-$>\*(C'\fR, which includes the \&\s-1UID\s0 of the process in the filename. .IP "init_file" 4 .IX Item "init_file" .PD 0 .IP "cache_size" 4 .IX Item "cache_size" .IP "unlink_on_exit" 4 .IX Item "unlink_on_exit" .PD See the Cache::FastMmap documentation for the meaning of these keys. If these keys are not present Cache::FastMmap's defaults will be used. .SH "SEE ALSO" .IX Header "SEE ALSO" Catalyst, Catalyst::Plugin::Session, Cache::FastMmap. .SH "AUTHORS" .IX Header "AUTHORS" This module is derived from Catalyst::Plugin::Session::FastMmap code, and has been heavily modified since. .PP .Vb 7 \& Andrew Ford \& Andy Grundman \& Christian Hansen \& Yuval Kogman, \& Marcus Ramberg \& Sebastian Riedel \& Tomas Doran, (t0m) .Ve .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (c) 2005 \- 2012 the Catalyst::Plugin::Session::Store::FastMmap \*(L"\s-1AUTHORS\*(R"\s0 as listed above. .SH "LICENSE" .IX Header "LICENSE" This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.