Permalink
Browse files

DOCUMENTATION FOR:

* Add ability to configure the number of levels and hash length for
  the directory structure of file-based sessions. Instead of a fixed
  value of 2 and 1 for levels and length, respectively, make two
  configuration parameters:

  	SessionHashLength
  	SessionHashLevels

  Default is 1 and 2, respectively, matching the current values.

  This solves the problem of session IDs passed from CGI::Session or other
  modules that use a quasi-sequential session ID. You end up placing all
  sessions in the S/2 directory for a long time, followed by the S/3 directory,
  etc. A setting of:

  	SessionHashLength   4
  	SessionHashLevels   1

  would break sessions up into separate directories instead of putting all
  sessions in a huge directory.
  • Loading branch information...
1 parent be976a7 commit 84eca367e4415a7502b5975453f2f5051b47c36d @racke racke committed Apr 21, 2009
Showing with 129 additions and 0 deletions.
  1. +65 −0 refs/SessionHashLength
  2. +64 −0 refs/SessionHashLevels
View
@@ -0,0 +1,65 @@
+__NAME__ purpose
+specify the number of characters to hash session directories
+__END__
+
+
+__NAME__ synopsis
+<arg choice='plain'><replaceable>integer</replaceable></arg>
+__END__
+
+
+__NAME__ see also
+SessionHashLevels
+__END__
+
+
+__NAME__ description
+This directive combiles with SessionHashLevels to configure the number of levels and hash length for
+the directory structure of file-based sessions.
+
+Default is 1.
+
+This solves the problem of session IDs passed from CGI::Session or other
+modules that use a quasi-sequential session ID. You end up placing all
+sessions in the S/2 directory for a long time, followed by the S/3 directory,
+etc. A setting of:
+
+SessionHashLength 4
+SessionHashLevels 1
+
+would break sessions up into separate directories instead of putting all
+sessions in a huge directory.
+__END__
+
+__NAME__ notes
+The default value of 1, combined with SessionHashLevels of 2, creates a
+directory structure like:
+
+<programlisting>
+ 4
+ +----w
+ 6
+ +----r
+ D
+ +----9
+ +----R
+ r
+ +----z
+ s
+ +----s
+ X
+ +----s
+ z
+ +----3
+</programlisting>
+
+__END__
+
+__NAME__ example: Setting SessionExpire
+Put the following in &ccf;:
+<programlisting>
+SessionHashLength 4
+SessionHashLevels 1
+</programlisting>
+__END__
+
View
@@ -0,0 +1,64 @@
+__NAME__ purpose
+specify the number of levels to hash session directories
+__END__
+
+__NAME__ synopsis
+<arg choice='plain'><replaceable>integer</replaceable></arg>
+__END__
+
+
+__NAME__ see also
+SessionHashLength
+__END__
+
+
+__NAME__ description
+This directive combiles with SessionHashLength to configure the number of levels and hash length for
+the directory structure of file-based sessions.
+
+Default is 1.
+
+This solves the problem of session IDs passed from CGI::Session or other
+modules that use a quasi-sequential session ID. You end up placing all
+sessions in the S/2 directory for a long time, followed by the S/3 directory,
+etc. A setting of:
+
+SessionHashLength 4
+SessionHashLevels 1
+
+would break sessions up into separate directories instead of putting all
+sessions in a huge directory.
+__END__
+
+__NAME__ notes
+The default value of 2, combined with SessionHashLength of 1, creates a
+directory structure like:
+
+<programlisting>
+ 4
+ +----w
+ 6
+ +----r
+ D
+ +----9
+ +----R
+ r
+ +----z
+ s
+ +----s
+ X
+ +----s
+ z
+ +----3
+</programlisting>
+
+__END__
+
+__NAME__ example: Setting SessionExpire
+Put the following in &ccf;:
+<programlisting>
+SessionHashLevels 1
+SessionHashLength 4
+</programlisting>
+__END__
+

0 comments on commit 84eca36

Please sign in to comment.