From 16e577c7989c35df92676c0cbd0e306bad92663d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Thu, 14 Feb 2008 18:42:54 +0000 Subject: [PATCH] explain why the CDB config entries are not cached git-svn-id: https://svn.perl.org/qpsmtpd/trunk@847 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index b077902..ec1d5b0 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -178,6 +178,7 @@ sub get_qmail_config { my $configfile = "$configdir/$config"; + # CDB config support really should be moved to a plugin if ($type and $type eq "map") { unless (-e $configfile . ".cdb") { $_config_cache->{$config} = []; @@ -195,8 +196,9 @@ sub get_qmail_config { $self->log(LOGERROR, "tie of $configfile.cdb failed: $!"); return +{}; } - #warn Data::Dumper->Dump([\%h], [qw(h)]); - # should we cache this? + # We explicitly don't cache cdb entries. The assumption is that + # the data is in a CDB file in the first place because there's + # lots of data and the cache hit ratio would be low. return \%h; }