Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 17903 invoked from network); 9 Jun 2008 17:59:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jun 2008 17:59:42 -0000 Received: (qmail 44580 invoked by uid 500); 9 Jun 2008 17:59:40 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 44522 invoked by uid 500); 9 Jun 2008 17:59:40 -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 44511 invoked by uid 99); 9 Jun 2008 17:59:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jun 2008 10:59:40 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [81.7.202.143] (HELO mxvs2.esa.t-systems.com) (81.7.202.143) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jun 2008 17:58:50 +0000 Received: from unknown (HELO nl-exc-01.intra.local) ([82.210.235.24]) by mx.esa.t-systems.com with ESMTP; 09 Jun 2008 17:58:58 +0000 Received: from 10.100.161.17 ([10.100.161.17]) by nl-exc-01.intra.local ([10.100.254.122]) with Microsoft Exchange Server HTTP-DAV ; Mon, 9 Jun 2008 17:57:36 +0000 Received: from nb-kiffing by NL-EXC-01.intra.local; 09 Jun 2008 19:59:05 +0200 Subject: Using hash tables globally ... From: Kiffin Gish To: dev@httpd.apache.org Cc: Kiffin Gish Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Mon, 09 Jun 2008 19:59:05 +0200 Message-Id: <1213034345.6276.17.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 X-NAIMIME-Disclaimer: 1 X-NAIMIME-Modified: 1 X-Virus-Checked: Checked by ClamAV on apache.org I'm trying to use a hash table to save a global cache of calculated areas based on the request url. The idea is that if the give area is already in the cache then I can use its pre-calculated value, otherwise first time I do the complicated calculation and save the results in the hash table. In my hook_post_config() routine I have: SERVER_CONFIG *s_cfg = ap_get_module_config(s->module_config, &wmscache_module); ... s_cfg->hash_tilecache = apr_hash_make(pconf); ... return OK; In my hook_translate_name() routine I save the calculations in the hash, but the next time hook_translate_name() is called, the hash no longer contains this/any value, it's disappeared. What do I need to do to make this hash table persistent globally and be updated properly within each url request? Thanks alot in advance, Kiffin -- Kiffin Gish | Desktop & Services Development | TomTom | kiffin.gish@tomtom.com | +31 (0) 6 15529214 mobile | +31 (0) 20 757 5000 office This e-mail message contains information which is confidential and may be privileged. It is intended for use by the addressee only. If you are not the intended addressee, we request that you notify the sender immediately and delete or destroy this e-mail message and any attachment(s), without copying, saving, forwarding, disclosing or using its contents in any other way. TomTom N.V., TomTom International BV or any other company belonging to the TomTom group of companies will not be liable for damage relating to the communication by e-mail of data, documents or any other information.