Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 May 2012 15:10:41 +0000 (UTC)
From:      Dag-Erling Smorgrav <des@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r235838 - in user/des/fbce: . lib
Message-ID:  <201205231510.q4NFAfTX079706@svn.freebsd.org>

index | next in thread | raw e-mail

Author: des
Date: Wed May 23 15:10:41 2012
New Revision: 235838
URL: http://svn.freebsd.org/changeset/base/235838

Log:
  Use per-user session caches.  This makes it possible to run scripts such
  as fbce_test.pl or fbce_user.pl as yourself while the system is running
  as www:www, since the session cache is created at startup rather than at
  first use.
  
  Note that per-process session caches are not a good idea unless some sort
  of session affinity is in place.

Modified:
  user/des/fbce/fbce.conf
  user/des/fbce/lib/FBCE.pm

Modified: user/des/fbce/fbce.conf
==============================================================================
--- user/des/fbce/fbce.conf	Wed May 23 15:06:13 2012	(r235837)
+++ user/des/fbce/fbce.conf	Wed May 23 15:10:41 2012	(r235838)
@@ -26,6 +26,6 @@ title = 2012 FreeBSD Core Team Election
   expires = 1800
   cookie_expires = 0
   # cookie_secure = true
-  # storage = /var/run/fbce.cache
+  storage = /tmp/fbce.__UID__/session-cache
   cache_size = 8m
 </Plugin::Session>

Modified: user/des/fbce/lib/FBCE.pm
==============================================================================
--- user/des/fbce/lib/FBCE.pm	Wed May 23 15:06:13 2012	(r235837)
+++ user/des/fbce/lib/FBCE.pm	Wed May 23 15:10:41 2012	(r235838)
@@ -26,6 +26,12 @@ $VERSION = eval $VERSION;
 __PACKAGE__->config(
     name => 'FBCE',
     view => 'HTML',
+    'Plugin::ConfigLoader' => {
+	substitutions => {
+	    UID => sub { $< },
+	    PID => sub { $$ },
+	},
+    },
     'Plugin::Static::Simple' => {
 	dirs => [ 'static' ],
     },


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205231510.q4NFAfTX079706>