Skip to content
  • Timo Teräs's avatar
    enable automatic update of indexes controlled by --cache-max-age · 8a28c6d0
    Timo Teräs authored
    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.
    8a28c6d0