[AstroPy] invalidate download cache items

Ivan Zolotukhin ivan.zolotukhin at gmail.com
Mon Mar 20 17:28:29 EDT 2017


Hi,

In some of my web applications I use astropy's fits.open(url) calls
which transparently cache downloaded files providing significant speed
up of the service for repeated calls. However, I'd like to have more
fine grained control over this cache. In particular, this cache
assumes that the fetched URL content never changes which is not the
case for my setup (it happens though rarely). I just had to drop few
tens of thousands cached files because I could not find the right one
which changed, and this causes measurable slow down of the web app I'd
like to avoid in future. Implementing own conditional cache=False
logics does not seem worth it.

Is there any advice on how can one invalidate some cached URLs?

--
With best regards,
 Ivan



More information about the AstroPy mailing list