Return-Path: X-Original-To: apmail-httpd-dev-archive@www.apache.org Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D0EBAD29C for ; Mon, 10 Dec 2012 17:34:41 +0000 (UTC) Received: (qmail 60547 invoked by uid 500); 10 Dec 2012 17:34:41 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 60353 invoked by uid 500); 10 Dec 2012 17:34:36 -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 60329 invoked by uid 99); 10 Dec 2012 17:34:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2012 17:34:35 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [207.172.157.102] (HELO smtp02.lnh.mail.rcn.net) (207.172.157.102) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Dec 2012 17:34:25 +0000 Received: from mr17.lnh.mail.rcn.net ([207.172.157.37]) by smtp02.lnh.mail.rcn.net with ESMTP; 10 Dec 2012 12:33:53 -0500 Received: from smtp04.lnh.mail.rcn.net (smtp04.lnh.mail.rcn.net [207.172.157.104]) by mr17.lnh.mail.rcn.net (MOS 4.3.4-GA) with ESMTP id BVG25624; Mon, 10 Dec 2012 12:33:52 -0500 X-Auth-ID: anat Received: from 209-6-63-29.c3-0.sbo-ubr1.sbo.ma.cable.rcn.com (HELO utka.zajac) ([209.6.63.29]) by smtp04.lnh.mail.rcn.net with ESMTP; 10 Dec 2012 12:33:51 -0500 Message-ID: <50C61CE3.8090305@aldan.algebra.com> Date: Mon, 10 Dec 2012 12:33:23 -0500 From: "Mikhail T." User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120808 Thunderbird/14.0 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Are lookups in mod_rewrite's maps cached for the request? Content-Type: multipart/alternative; boundary="------------060202010507070307040901" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------060202010507070307040901 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Suppose I have the following construct: ... RewriteCond ${mymap:%1|NOT_FOUND} !=NOT_FOUND # Store the lookup-result in environment variable "target": RewriteRule - - [DP,E=target:${mymap:%1|NOT_FOUND}] Note, that the key for lookup in map mymap is the same. How many map-lookups will mod_rewrite perform? I'm hoping, only one... Now, I know, that there are "maps" and "fastmaps" -- the latter caching the lookup-results for ever. My question is about regular maps -- do they and, if not, should not they, cache the lookup results for the duration of a request? Thanks! Yours, -mi --------------060202010507070307040901 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Suppose I have the following construct:
...
RewriteCond    ${mymap:%1|NOT_FOUND}    !=NOT_FOUND
# Store the lookup-result in environment variable "target":
RewriteRule    -    -    [DP,E=target:${mymap:%1|NOT_FOUND}]

Note, that the key for lookup in map mymap is the same. How many map-lookups will mod_rewrite perform? I'm hoping, only one...

Now, I know, that there are "maps" and "fastmaps" -- the latter caching the lookup-results for ever. My question is about regular maps -- do they and, if not, should not they, cache the lookup results for the duration of a request?

Thanks! Yours,
-mi
--------------060202010507070307040901--