README
1NAME
2 Catalyst::Plugin::Session::Store::FastMmap - FastMmap session storage
3 backend.
4
5SYNOPSIS
6 use Catalyst qw/Session Session::Store::FastMmap Session::State::Foo/;
7
8 MyApp->config->{session} = {
9 expires => 3600,
10 storage => '/tmp/session'
11 };
12
13 # ... in an action:
14 $c->session->{foo} = 'bar'; # will be saved
15
16DESCRIPTION
17 "Catalyst::Plugin::Session::Store::FastMmap" is a fast session storage
18 plugin for Catalyst that uses an mmap'ed file to act as a shared memory
19 interprocess cache. It is based on Cache::FastMmap.
20
21 METHODS
22 get_session_data
23 store_session_data
24 delete_session_data
25 delete_expired_sessions
26 These are implementations of the required methods for a store. See
27 Catalyst::Plugin::Session::Store.
28
29 get_and_set_session_data
30 This is the optional method for atomic write semantics. See
31 Catalyst::Plugin::Session::AtomicWrite.
32
33 setup_session
34 Sets up the session cache file.
35
36CAVEATS
37 Very loaded sites with lots of data in the session hash may have old
38 sessions expired prematurely, due to the LRU caching policy employed by
39 Cache::FastMmap. To get around this you can increase the "cache_size"
40 parameter, or switch session storage backends.
41
42 This is particularly inappropriate for use as a backend for e.g.
43 Catalyst::Plugin::Session::PerUser, for example.
44
45 Cache::FastMmap defaults to around 5mb (89 * 64k).
46
47CONFIGURATION
48 These parameters are placed in the hash under the "session" key in the
49 configuration hash.
50
51 storage
52 Specifies the file to be used for the sharing of session data. The
53 default value will use File::Spec to find the default tempdir, and
54 use a file named "MyApp_session_data", where "MyApp" is replaced
55 with the appname.
56
57 Note that the file will be created with mode 0640, which means that
58 it will only be writeable by processes running with the same uid as
59 the process that creates the file. If this may be a problem, for
60 example if you may try to debug the program as one user and run it
61 as another, specify a filename like "/tmp/session-$>", which
62 includes the UID of the process in the filename.
63
64 init_file
65 cache_size
66 See the Cache::FastMmap documentation for the meaning of these keys.
67 If these keys are not present Cache::FastMmap's defaults will be
68 used.
69
70SEE ALSO
71 Catalyst, Catalyst::Plugin::Session, Cache::FastMmap.
72
73AUTHORS
74 This module is derived from Catalyst::Plugin::Session::FastMmap code,
75 and has been heavily modified since.
76
77 Andrew Ford Andy Grundman Christian Hansen Yuval Kogman,
78 "nothingmuch@woobling.org" Marcus Ramberg Sebastian Riedel
79
80COPYRIGHT
81 This program is free software, you can redistribute it and/or modify it
82 under the same terms as Perl itself.
83
84