Do Not Flush

Jeremy Nicoll - ml get_iplayer jn.ml.gti.91 at wingsandbeaks.org.uk
Thu Nov 20 04:37:14 PST 2014


"C E Macfarlane" <c.e.macfarlane at macfh.co.uk> wrote:

>I can't a GIP command-line option to prevent the cache being flushed and
>re-downloaded.  If there isn't one, can we have one?  Occasionally it would
>be very useful.

In my home-grown wrap-around for get_iplayer, I've been contemplating having
it make a backup of an existing cache before attempting a refresh, as I'd
rather have a slightly outofdate cache than none at all... which is what
happens if the refresh code runs when I'm offline or the connection is
having a go-slow (eg when my anti-virus/malware app is doing an definitions
update).  Perhaps an easier alternative would be to make a backup each time
a new cache is created, so one could reinstate an older one if needed.

I also have code that sanity checks the size of a cache file before doing
anything with it, as sometimes a refresh that's been incomplete just needs
run again.

I'd go further and say that it would be useful if cache entries which are
created from a specific source (or maybe for a specific channel or station)
don't get removed if that single source is unreachable during a refresh.

Maybe such logic would need to have a time threshhold (a day, two?) after
which it would remove old cache entries.  I think that's the sort of thing
that different people would have quite different views on.

I guess that'd add quite a lot of complexity to the refresh code though.

-- 
Jeremy Nicoll - my opinions are my own.



More information about the get_iplayer mailing list