Re: [PATCH 0/3] Git::Repo API and gitweb caching
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Jul 12, 2008, 15:08 UTC
- Message-ID
- <m3zloncf7g.fsf@localhost.localdomain>
- In-Reply-To
- <20080711162752.GA5456@toroid.org>
Abhijit Menon-Sen <ams@toroid.org> writes:
Show 13 quoted lines
> At 2008-07-11 16:07:26 +0200, lewiemann@gmail.com 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