You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Nicholas Oxhøj <ni...@oxhoej.dk> on 2001/10/11 13:15:56 UTC

Apache::Registry caching of compiled scripts

Hi

Does anybody know why Apache::Registry caches compiled scripts by their URI, instead of by their absolute path?

At my site we have quite a lot of virtual hosts, which use the same base of cgi scripts. This causes the same scripts to be compiled and cached several times (one time for each virtual host).

As I understand it, this behaviour COULD be changed by putting

  $Apache::Registry::NameWithVirtualHost = 0

in a perl start-up file, which would only cache on the relative URI (without the host name), but this won't really do, since not ALL the virtual hostst use the same base of CGI scripts.

So I was just wondering why the compiled scripts are not cached under the absolute path to the script, instead of under the URI, as the former seems quite logical at first and would seem to solve some performance/memory issues when using virtual hosts.

This design choice probably has a very good reason, which I am just unable to see. I would just like to find out in order to learn... :-)

Nicholas Oxhøj



Re: Apache::Registry caching of compiled scripts

Posted by darren chamberlain <dl...@users.sourceforge.net>.
Nicholas Oxhj <ni...@oxhoej.dk> said something to this effect on 10/11/2001:
> Does anybody know why Apache::Registry caches compiled scripts
> by their URI, instead of by their absolute path?

Try Apache::RegistryNG, which caches scripts by their filename.

(darren)

-- 
Premature optimization is the root of all evil in programming.
    -- C.A.R. Hoare