From dev-return-50886-apmail-httpd-dev-archive=httpd.apache.org@httpd.apache.org Sat Dec 03 11:40:37 2005 Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 42101 invoked from network); 3 Dec 2005 11:40:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Dec 2005 11:40:36 -0000 Received: (qmail 282 invoked by uid 500); 3 Dec 2005 11:40:29 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 99813 invoked by uid 500); 3 Dec 2005 11:40:28 -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 99800 invoked by uid 99); 3 Dec 2005 11:40:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2005 03:40:28 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.103.221.49] (HELO mta09-winn.ispmail.ntl.com) (81.103.221.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2005 03:41:57 -0800 Received: from aamta09-winn.ispmail.ntl.com ([81.103.221.35]) by mta09-winn.ispmail.ntl.com with ESMTP id <20051203114006.LNVU8609.mta09-winn.ispmail.ntl.com@aamta09-winn.ispmail.ntl.com> for ; Sat, 3 Dec 2005 11:40:06 +0000 Received: from chezphil.org ([80.4.0.152]) by aamta09-winn.ispmail.ntl.com with ESMTP id <20051203114006.DTGM1233.aamta09-winn.ispmail.ntl.com@chezphil.org> for ; Sat, 3 Dec 2005 11:40:06 +0000 Received: from [127.0.0.1] ([127.0.0.1]) by andorra with smtp (dmsmtpd 0.00001); Sat, 03 Dec 2005 11:40:03 +0000 Message-ID: <4391840F.9090801@chezphil.org> Date: Sat, 03 Dec 2005 11:39:59 +0000 User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: mod_auth[nz]_dbd password caching Content-Type: text/plain; charset="ISO-8859-1"; format="flowed" Content-Transfer-Encoding: 7bit From: Phil Endecott X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Dear All, First of all, congratulation on the release of 2.2. I use mod_auth_pgsql at http://anyterm.org/my.html, and found a problem earlier in the year. To get reasonable performance you need to use the module's caching mechanism, but this cache is not flushed or updated when the database changes. So things don't work properly when the user changes their password. I started to think about fixing it myself but quickly realised that both the database and authentication frameworks were changing in 2.1+ and decided to wait before doing anything. I now see that 2.2 has mod_auth[nz]_dbd - great! However, as far as I can see from http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html and the source, this new module doesn't do any caching. Is this true? To get the sort of performance that I need for my site I really need in-memory caching of passwords, but I also need to solve mod_auth_pgsql's non-updating problem. The solution to this is to use PostgreSQL's asynchronous notification mechanism: the module issues a "LISTEN" command and is then notified when the password table changes. I don't know if the APR DB interface has any support for this (it doesn't seem to be documented at all at http://apr.apache.org/docs/apr-util/modules.html); even if it does, it is not portable to other databases. Has anyone looked at this? If no-one is working on this and you think it would be a useful feature to add, I may be able to write something with a bit of help. Cheers, --Phil.