kansanmuisti / datavaalit

Datavaalit
GNU Affero General Public License v3.0
11 stars 3 forks source link

"force_load" optio HttpFetcher.open_url()-metodissa ei tee mitään #16

Open jlehtoma opened 12 years ago

jlehtoma commented 12 years ago

Lisää keskustelua aiheesta täällä:

https://github.com/jlehtoma/datavaalit/commit/97024f36d5f205545e5e03c6e9cac9442f1b3eee#commitcomment-1973338

@juyrjola kirjoitti:

Hmm, there is a "force_load" option in HttpFetcher.open_url(), but now it seems it's not used for anything... You could add an option "--cache" to run-importers.py that you could use to specify the cache directory. If that's not set, then cache would not be enabled.` [...] Ideally, we would do a HTTP HEAD and check the Modified timestamp (or however it's called) and only fetch the new file if the local copy is older. For now, a --disable-cache would do the trick. Making it a refresh would need some modifications in the cache code for replacing the stored copy. IIRC, the "force_load" option was supposed to do exactly that