I know that
apt update updates existing package-indexes on a supporting distro but not upgrading installed-packages (utilities) that were being installed based on these package-indexes (as
apt upgrade upgrades the packages).
updateis used to resynchronize the package index files from their sources. The indexes of available packages are fetched from the location(s) specified in
/etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the
Packages.gzfiles, so that information about new and updated packages is available. An update should always be performed before an
dist-upgrade. Please be aware that the overall progress meter will be incorrect as the size of the package files cannot be known in advance.
I also know that Ansible has the
apt module which includes this directive:
- name: update the apt package index i.e. apt-get update apt: update_cache=yes
The relevant Ansible docs say:
Run the equivalent of apt-get update before the operation. Can be run as part of the package installation or as a separate step.
I assume they say "equivalent" because Ansible translates "old" codes to their community-derived up2date equivalents (if the original codes themselves change).
But I still miss what caching has to do with anything here? To me the concept of caching in computing is making a copy of something far in a closer place, to save navigation when we need to use it, thus saving resources, but I still miss what it has to do with
apt update or Ansible processing of