| 1 |
NAME |
| 2 |
Catalyst::Plugin::Session::Store::File - File storage backend for |
| 3 |
session data. |
| 4 |
|
| 5 |
SYNOPSIS |
| 6 |
use Catalyst qw/Session Session::Store::File Session::State::Foo/; |
| 7 |
|
| 8 |
MyApp->config->{'Plugin::Session'} = { |
| 9 |
storage => '/tmp/session' |
| 10 |
}; |
| 11 |
|
| 12 |
# ... in an action: |
| 13 |
$c->session->{foo} = 'bar'; # will be saved |
| 14 |
|
| 15 |
DESCRIPTION |
| 16 |
"Catalyst::Plugin::Session::Store::File" is an easy to use storage |
| 17 |
plugin for Catalyst that uses an simple file to act as a shared memory |
| 18 |
interprocess cache. It is based on "Cache::FileCache". |
| 19 |
|
| 20 |
METHODS |
| 21 |
get_session_data |
| 22 |
store_session_data |
| 23 |
delete_session_data |
| 24 |
delete_expired_sessions |
| 25 |
These are implementations of the required methods for a store. See |
| 26 |
Catalyst::Plugin::Session::Store. |
| 27 |
|
| 28 |
setup_session |
| 29 |
Sets up the session cache file. |
| 30 |
|
| 31 |
CONFIGURATION |
| 32 |
These parameters are placed in the hash under the "Plugin::Session" key |
| 33 |
in the configuration hash. |
| 34 |
|
| 35 |
storage |
| 36 |
Specifies the directory root to be used for the sharing of session |
| 37 |
data. The default value will use File::Spec to find the default |
| 38 |
tempdir, and use a file named "MyApp/session/data", where "MyApp" is |
| 39 |
replaced with the appname. |
| 40 |
|
| 41 |
Note that the file will be created with mode 0640, which means that |
| 42 |
it will only be writeable by processes running with the same uid as |
| 43 |
the process that creates the file. If this may be a problem, for |
| 44 |
example if you may try to debug the program as one user and run it |
| 45 |
as another, specify a directory like "/tmp/session-$>", which |
| 46 |
includes the UID of the process in the filename. |
| 47 |
|
| 48 |
relative |
| 49 |
Makes the storage path relative to *$c-*path_to> |
| 50 |
|
| 51 |
namespace |
| 52 |
The namespace associated with this cache. Defaults to an empty |
| 53 |
string if not explicitly set. If set, the session data will be |
| 54 |
stored in a directory called "MyApp/session/data/<namespace">. |
| 55 |
|
| 56 |
cache_depth |
| 57 |
The number of subdirectories deep to session object item. This |
| 58 |
should be large enough that no session directory has more than a few |
| 59 |
hundred objects. Defaults to 3 unless explicitly set. |
| 60 |
|
| 61 |
directory_umask |
| 62 |
The directories in the session on the filesystem should be globally |
| 63 |
writable to allow for multiple users. While this is a potential |
| 64 |
security concern, the actual cache entries are written with the |
| 65 |
user's umask, thus reducing the risk of cache poisoning. If you |
| 66 |
desire it to only be user writable, set the 'directory_umask' option |
| 67 |
to '077' or similar. Defaults to '000' unless explicitly set. |
| 68 |
|
| 69 |
SEE ALSO |
| 70 |
Catalyst, Catalyst::Plugin::Session, Cache::FileCache. |
| 71 |
|
| 72 |
AUTHOR |
| 73 |
Sascha Kiefer, [email protected] |
| 74 |
|
| 75 |
COPYRIGHT AND LICENSE |
| 76 |
Copyright (C) 2005 Sascha Kiefer |
| 77 |
|
| 78 |
This library is free software; you can redistribute it and/or modify it |
| 79 |
under the same terms as Perl itself. |
| 80 |
|