diff options
author | Timo Teräs <timo.teras@iki.fi> | 2018-01-04 09:46:03 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2018-01-04 10:56:09 +0200 |
commit | 8a28c6d0d4f81406c67e76b2bcdbe491aa734717 (patch) | |
tree | 148555889d66a69cdcd979ad77f1ba728b747f53 /src/apk_io.h | |
parent | 2da67940d50865d206f6a79165ce7b3de5a90de3 (diff) | |
download | apk-tools-8a28c6d0d4f81406c67e76b2bcdbe491aa734717.tar.gz apk-tools-8a28c6d0d4f81406c67e76b2bcdbe491aa734717.tar.bz2 apk-tools-8a28c6d0d4f81406c67e76b2bcdbe491aa734717.tar.xz apk-tools-8a28c6d0d4f81406c67e76b2bcdbe491aa734717.zip |
enable automatic update of indexes controlled by --cache-max-age
This modifies apk cache for indexes to be automatically refreshed
periodically without explicit 'update' or '--update-cache' usage.
The default is to do if-modified-since request if the local copy
is older than 4 hours. This age can be changed with --cache-max-age.
Using --update-cache will change this age to 60 seconds to make
sure the cached copy is relatively new. The small age is in order
to try to avoid downloading indexes second time when apk-tools is
upgraded and apk re-execs after self-upgrade.
Accordingly using explicitly 'apk update' will now enforce
--force-refresh and request the very latest index by requesting
any potential http proxy to do refresh too.
Diffstat (limited to 'src/apk_io.h')
-rw-r--r-- | src/apk_io.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apk_io.h b/src/apk_io.h index 48bae5f..94aa989 100644 --- a/src/apk_io.h +++ b/src/apk_io.h @@ -147,7 +147,7 @@ struct apk_bstream *apk_bstream_from_istream(struct apk_istream *istream); struct apk_bstream *apk_bstream_from_fd_pid(int fd, pid_t pid, int (*translate_status)(int)); struct apk_bstream *apk_bstream_from_file(int atfd, const char *file); struct apk_bstream *apk_bstream_from_fd_url_if_modified(int atfd, const char *url, time_t since); -struct apk_bstream *apk_bstream_tee(struct apk_bstream *from, int atfd, const char *to, +struct apk_bstream *apk_bstream_tee(struct apk_bstream *from, int atfd, const char *to, int copy_meta, apk_progress_cb cb, void *cb_ctx); static inline struct apk_bstream *apk_bstream_from_fd(int fd) |