[Yum-devel] how long to hold on to a mirrorlist

Michael E Brown Michael_E_Brown at dell.com
Mon Jul 2 21:59:25 UTC 2007


On Mon, Jul 02, 2007 at 05:21:14PM -0400, James Antill wrote:
> On Mon, 2007-07-02 at 15:20 -0500, Michael E Brown wrote:
> > On Mon, Jul 02, 2007 at 02:31:31PM -0400, seth vidal wrote:
> > > On Mon, 2007-07-02 at 13:28 -0500, Michael E Brown wrote:
> > > > 
> > > > The point is still valid.
> > > >   -- If mirrolist was http:// url, then look for expires: http response
> > > >   code and use that. How about:
> > > > 
> > > > /etc/yum.repos.d/site.repo:
> > > > [repo-name]
> > > > ...
> > > > mirrorlist_cache_enable        = bool
> > > > mirrorlist_cache_expire_method = [ http | manual ]
> > > >     default to manual for ftp:// and file:// URLs and http for http:// URLs
> > > > mirrorlist_cache_expire        = timespec (for manual only)
> > > >     default to a reasonable value (1 week)
> > > > 
> > > 
> > > why add all that code when we can just  check the timestamp on the file
> > > we saved and compare it? How much benefit to the user are we enabling by
> > > implementing all of the above? More options != more benefit.
> > 
> > I'm not proposing this in order to benefit users at all. I run a repo,
> > and this would help me as the repository maintainer.
> [...]
> > Normal DNS zone would have timeout of 1 week. When I know I
> > have a change coming up, I turn down the timeout to 1 day. The day
> > before the change, I change the timeout to 1 hour. That way, when I make
> > the change, I know that nobody will have stale cached data.
> 
>  Why doesn't yum just obeying expires help here? Most webservers allow
> you to do something like the above using _just_ expires controls.

Having yum just obey http expires and/or http cache-control would do the
trick for me. No objections there. I thought it would be helpful to have
the other configure options for configurability.

My point was a rebuttal to Seth's suggestion of just checking timestamp.
We really need to save off the http headers so that we know how long the
server end wants us to cache things.
--
Michael



More information about the Yum-devel mailing list