Implement a TTL on cached fetchurl/fetchTarball results

This is because we don't want to do HTTP requests on every evaluation,
even though we can prevent a full redownload via the cached ETag. The
default is one hour.
This commit is contained in:
Eelco Dolstra 2015-04-09 11:55:36 +02:00
parent 60340ce3e2
commit c1f04fae35
3 changed files with 34 additions and 13 deletions

View file

@ -27,6 +27,8 @@ struct Settings {
bool get(const string & name, bool def);
int get(const string & name, int def);
void update();
string pack();