User: heins
Date: 2009-04-16 16:58:31 GMT
Modified: . WHATSNEW-5.7
Modified: lib/Vend Config.pm SessionFile.pm
Log:
* 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.
Revision Changes Path
2.39 interchange/WHATSNEW-5.7
rev 2.39, prev_rev 2.38
Index: WHATSNEW-5.7
===================================================================
RCS file: /var/cvs/interchange/WHATSNEW-5.7,v
retrieving revision 2.38
retrieving revision 2.39
diff -u -r2.38 -r2.39
--- WHATSNEW-5.7 16 Apr 2009 14:54:14 -0000 2.38
+++ WHATSNEW-5.7 16 Apr 2009 16:58:31 -0000 2.39
@@ -60,7 +60,7 @@
* Add reload of AutoModifier based on a prepended ! (exclamation point).
Example:
- AutoModifier !download pricing:price_group
+ AutoModifier !download pricing:price_group
The download attribute will be recomputed for the current sku when
the cart is recalculated.
@@ -70,7 +70,7 @@
that field. No default, so not operational in standard demo catalog.
Enabled with:
- UserDB default merged_user merge_to
+ UserDB default merged_user merge_to
That would look in the database field "merge_to" for a user name
to change to.
@@ -85,6 +85,24 @@
* Shorthand added to allow beginning/ending year with date widget
name (i.e. yearbegin1934, yearend=0000 where 0000 means current year).
+* 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 named SessionHashLevels and SessionHashLength
+
+ Default is 2 and 1, 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.
+
Payment
-------
2.246 interchange/lib/Vend/Config.pm
rev 2.246, prev_rev 2.245
Index: Config.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Config.pm,v
retrieving revision 2.245
retrieving revision 2.246
diff -u -r2.245 -r2.246
--- Config.pm 6 Apr 2009 12:23:22 -0000 2.245
+++ Config.pm 16 Apr 2009 16:58:31 -0000 2.246
@@ -1,6 +1,6 @@
# Vend::Config - Configure Interchange
#
-# $Id: Config.pm,v 2.245 2009-04-06 12:23:22 markj Exp $
+# $Id: Config.pm,v 2.246 2009-04-16 16:58:31 mheins Exp $
#
# Copyright (C) 2002-2009 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -54,7 +54,7 @@
use Vend::Data;
use Vend::Cron;
-$VERSION = substr(q$Revision: 2.245 $, 10);
+$VERSION = substr(q$Revision: 2.246 $, 10);
my %CDname;
my %CPname;
@@ -716,6 +716,8 @@
['BounceReferrals', 'yesno', 'no'],
['OrderCleanup', 'routine_array', ''],
['SessionCookieSecure', 'yesno', 'no'],
+ ['SessionHashLength', 'integer', 1],
+ ['SessionHashLevels', 'integer', 2],
['SourcePriority', 'array_complete', 'mv_pc mv_source'],
['SourceCookie', sub { &parse_ordered_attributes(@_, [qw(name expire domain path secure)]) }, '' ],
2.8 interchange/lib/Vend/SessionFile.pm
rev 2.8, prev_rev 2.7
Index: SessionFile.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/SessionFile.pm,v
retrieving revision 2.7
retrieving revision 2.8
diff -u -r2.7 -r2.8
--- SessionFile.pm 4 Dec 2007 01:57:44 -0000 2.7
+++ SessionFile.pm 16 Apr 2009 16:58:31 -0000 2.8
@@ -1,6 +1,6 @@
# Vend::SessionFile - Stores Interchange session information in files
#
-# $Id: SessionFile.pm,v 2.7 2007-12-04 01:57:44 markj Exp $
+# $Id: SessionFile.pm,v 2.8 2009-04-16 16:58:31 mheins Exp $
#
# Copyright (C) 2002-2007 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -29,7 +29,7 @@
use Vend::Util;
use vars qw($VERSION);
-$VERSION = substr(q$Revision: 2.7 $, 10);
+$VERSION = substr(q$Revision: 2.8 $, 10);
my $SessionDir;
my $CommDir;
@@ -56,7 +56,7 @@
}
sub keyname {
- return Vend::Util::get_filename(shift, 2, 1, $SessionDir);
+ return Vend::Util::get_filename(shift, $Vend::Cfg->{SessionHashLevels}, $Vend::Cfg->{SessionHashLength}, $SessionDir);
}
sub FETCH {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.