1Catalyst::Plugin::SessiUosne:r:SCtoonrter:i:bCFuaattseatdlMymPsaetpr:(l:3P)Dloucguimne:n:tSaetsisoinon::Store::FastMmap(3)
2
3
4
6 Catalyst::Plugin::Session::Store::FastMmap - FastMmap session storage
7 backend.
8
10 use Catalyst qw/Session Session::Store::FastMmap Session::State::Foo/;
11
12 MyApp->config(
13 'Plugin::Session' => {
14 expires => 3600,
15 storage => '/tmp/session'
16 },
17 );
18
19 # ... in an action:
20 $c->session->{foo} = 'bar'; # will be saved
21
23 "Catalyst::Plugin::Session::Store::FastMmap" is a fast session storage
24 plugin for Catalyst that uses an mmap'ed file to act as a shared memory
25 interprocess cache. It is based on Cache::FastMmap.
26
27 METHODS
28 get_session_data
29 store_session_data
30 delete_session_data
31 delete_expired_sessions
32 These are implementations of the required methods for a store. See
33 Catalyst::Plugin::Session::Store.
34
35 get_and_set_session_data
36 This is the optional method for atomic write semantics. See
37 Catalyst::Plugin::Session::AtomicWrite.
38
39 setup_session
40 Sets up the session cache file.
41
43 Very loaded sites with lots of data in the session hash may have old
44 sessions expired prematurely, due to the LRU caching policy employed by
45 Cache::FastMmap. To get around this you can increase the "cache_size"
46 parameter, or switch session storage backends. Cache::FastMmap
47 defaults to around 5mb (89 * 64k).
48
49 This is particularly inappropriate for use as a backend for e.g.
50 Catalyst::Plugin::Session::PerUser, for example.
51
52 As Cache::FastMmap is not "thread-safe" (at least version 1.30 and
53 before) therefore also this module does not work in multi-threaded
54 environment. It is "fork-safe", however keep in mind that on Win32 the
55 perl "fork" call is implemented as an emulation via threads - that is
56 the reason why you cannot use this store for example when running you
57 catalyst application on Win32 platform with
58 Catalyst::Engine::HTTP::Prefork engine.
59
61 These parameters are placed in the hash under the "Plugin::Session" key
62 in the configuration hash.
63
64 storage
65 Specifies the file to be used for the sharing of session data. The
66 default value will use File::Spec to find the default tempdir, and
67 use a file named "MyApp_session_data", where "MyApp" is replaced
68 with the appname.
69
70 Note that the file will be created with mode 0640, which means that
71 it will only be writeable by processes running with the same uid as
72 the process that creates the file. If this may be a problem, for
73 example if you may try to debug the program as one user and run it
74 as another, specify a filename like "/tmp/session-$>", which
75 includes the UID of the process in the filename.
76
77 init_file
78 cache_size
79 unlink_on_exit
80 See the Cache::FastMmap documentation for the meaning of these
81 keys. If these keys are not present Cache::FastMmap's defaults will
82 be used.
83
85 Catalyst, Catalyst::Plugin::Session, Cache::FastMmap.
86
88 This module is derived from Catalyst::Plugin::Session::FastMmap code,
89 and has been heavily modified since.
90
91 Andrew Ford
92 Andy Grundman
93 Christian Hansen
94 Yuval Kogman, <nothingmuch@woobling.org>
95 Marcus Ramberg
96 Sebastian Riedel
97 Tomas Doran, (t0m) <bobtfish@bobtfish.net>
98
100 Copyright (c) 2005 - 2012 the
101 Catalyst::Plugin::Session::Store::FastMmap "AUTHORS" as listed above.
102
104 This program is free software, you can redistribute it and/or modify it
105 under the same terms as Perl itself.
106
107
108
109perl v5.28.1 C2a0t1a2l-y0s1t-:3:1Plugin::Session::Store::FastMmap(3)