Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 26241 invoked from network); 17 Jun 2010 13:13:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Jun 2010 13:13:02 -0000 Received: (qmail 84465 invoked by uid 500); 17 Jun 2010 07:36:56 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 83786 invoked by uid 500); 17 Jun 2010 07:36:53 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 83777 invoked by uid 99); 17 Jun 2010 07:36:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jun 2010 07:36:52 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=SPF_HELO_FAIL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of margol@beamartyr.net designates 199.203.54.245 as permitted sender) Received: from [199.203.54.245] (HELO mail1.mirimar.net) (199.203.54.245) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jun 2010 07:36:43 +0000 Received: from [192.168.1.35] (84.94.52.82.cable.012.net.il [84.94.52.82]) (authenticated bits=0) by mail1.mirimar.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o5H7aIGF024117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 17 Jun 2010 10:36:19 +0300 Message-ID: <4C19D06C.1030808@beamartyr.net> Date: Thu, 17 Jun 2010 10:36:12 +0300 From: Issac Goldstand User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: mod_authn_cache References: <20100616232934.300087a4@baldur> In-Reply-To: <20100616232934.300087a4@baldur> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.96 at hector.mirimar.net X-Virus-Status: Clean X-Spam-Level: *** X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on heartofgold.mirimar.net X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=3.1 required=5.0 tests=BAYES_00,RCVD_IN_PBL, RCVD_IN_SORBS_DUL,RDNS_DYNAMIC,SPF_SOFTFAIL,TO_NO_BRKTS_DYNIP autolearn=no version=3.3.1 I think I sent a patch to fix it up a year or so ago, when I needed it for 2.2. You can see the fully working (live in production for 6 months now, I think) code here. http://sourceforge.net/tracker/download.php?group_id=93106&atid=603134&file_id=350405&aid=2895850 As mentioned there, I wanted this to work against 2.2, but for trunk I'd have probably used socache instead of the static array used here. Issac On 6/17/2010 1:29 AM, Nick Kew wrote: > I thought we had a mod_authn_cache, but it seems it only exists in the > old 2.1 authn stuff at sourceforge! > > Just thinking about hacking this up, and wondering how best to do it. > Basic shape seems straightforward enough: > > 1. Make it a provider like the standard mod_authn_**** > 2. Configure it ahead of anything heavyweight like dbd. > 3. Export an optional function for other mod_authn_* modules to cache > credentials they've looked up. > 4. Timestamp everything in cache, and provide a configurable timeout. > > But how to implement the cache itself is less clear. The simplest solution > would be to hijack mod_authn_dbm and add a cacheing function and configuration. > But the new socache framework presents an alternative, and an option for users > of threaded MPMs to run a per-process cache would add value. > > Thoughts? > >