All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "Julio Lajara" <julio.lajara@alum.rpi.edu>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Anders Kaseorg" <andersk@mit.edu>,
	git@vger.kernel.org,
	"Pavan Kumar Sunkara" <pavan.sss1991@gmail.com>
Subject: Re: [PATCH/RFC] gitweb: allow configurations that change with each request
Date: Mon, 2 Aug 2010 23:25:22 +0200	[thread overview]
Message-ID: <201008022325.23670.jnareb@gmail.com> (raw)
In-Reply-To: <20100802210121.GA3072@burratino>

Jonathan Nieder wrote:
> Jakub Narebski wrote:
> 
> > One solution I can think of (still backwards incompatibile) would be to
> > provide $per_request_config variable, which would hold anonymous sub
> > with parts of config that need to be done per request (this should work
> > with global variables (our), but I think it wouldn't work with lexical
> > variables (my)).  For example gitolite's contrib/gitweb/gitweb.conf would
> > then include:
> > 
> >   $per_request_config = sub {
> >   	$ENV{GL_USER} = $cgi->remote_user || "gitweb";
> >   }
> 
> How would that interact with caching?  i.e., how would whatever caching
> engine is used learn that $cgi->remote_user is part of the key needed to
> uniquely determine a response?

Well, obviously caching itself, including generating cache key, would be
done per-request.  It is only *initializing* cache (i.e. require + 
+ $cache->new()) that should be done once per run and not once per 
request.

But nevermind, this might be not much of a problem.  I'll start with
cache re-initialized on each request for start.

-- 
Jakub Narebski
Poland

  reply	other threads:[~2010-08-02 21:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-26  4:55 Potential bug in gitweb 1.7.2 Julio Lajara
2010-07-26  5:08 ` Jonathan Nieder
2010-07-26  9:27   ` Anders Kaseorg
2010-07-26 13:10     ` Julio Lajara
2010-07-26 13:36       ` Jakub Narebski
2010-07-26 13:39         ` Ævar Arnfjörð Bjarmason
2010-07-26 13:52           ` Julio Lajara
2010-07-26 14:23             ` Jakub Narebski
2010-07-31  3:01               ` [PATCH/RFC] gitweb: allow configurations that change with each request Jonathan Nieder
2010-08-02 19:35                 ` Jakub Narebski
2010-08-02 21:01                   ` Jonathan Nieder
2010-08-02 21:25                     ` Jakub Narebski [this message]
2010-07-26 15:23     ` Potential bug in gitweb 1.7.2 Jonathan Nieder
2010-07-26 18:50       ` Anders Kaseorg
2010-07-27  0:09         ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008022325.23670.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=andersk@mit.edu \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=julio.lajara@alum.rpi.edu \
    --cc=pavan.sss1991@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.