Subject: Re: [PATCH 0/3] Git::Repo API and gitweb caching

From: Jakub Narebski <[email-masked]>
Date: Sat, 12 Jul 2008 08:08:56 -0700 (PDT)

Abhijit Menon-Sen <[email-masked]> writes:

> At 2008-07-11 16:07:26 +0200, [email-masked] wrote:
> >
> > > 'If-Not-Modified-Since', 'If-Match' (by caches)
> > 
> > Wait, are you sure caches would use those headers (I believe only the
> > latter actually exists BTW), or did you fall prey to a thinko? ;)
> 
> If-Not-Modified-Since should really be If-Unmodified-Since.
> 
> But where's the thinko? To send If-Modified-Since or similar with a
> request, you would need to have a cached copy of the resource and use
> its Last-Modified, for example. Sure, you could do it without one, but
> what would be the point?

Actually the thinko was use of If-Unmodified-Since: and If-Match:.

Both If-Unmodified-Since and If-Match can be used and should be used
when requesting *partial document transfers* (when you need to ensure
that document is unchanged before you fetch next part of it).  
Additionally If-Match can be used for concurrenty control when you
do a two-way communication using GET and PUT, in a PUT request to
ensure that you are modifying correct document.

They are not used, I think, by caches to refresh cached data.
-- 
Jakub Narebski
Poland
ShadeHawk on #git