2018-06-18 20:17:30 +00:00
|
|
|
***********
|
|
|
|
Local Cache
|
|
|
|
***********
|
|
|
|
|
|
|
|
In order to speed up certain operations, restic manages a local cache of data.
|
2020-10-07 15:13:29 +00:00
|
|
|
The location of the cache directory depends on the operating system and the
|
|
|
|
environment; see :ref:`caching`.
|
2018-06-18 20:17:30 +00:00
|
|
|
|
2018-10-11 12:00:51 +00:00
|
|
|
Each repository has its own cache sub-directory, consisting of the repository ID
|
2022-05-07 20:23:59 +00:00
|
|
|
which is chosen at ``init``. All cache directories for different repositories are
|
2018-06-18 20:17:30 +00:00
|
|
|
independent of each other.
|
|
|
|
|
|
|
|
Snapshots, Data and Indexes
|
|
|
|
===========================
|
|
|
|
|
|
|
|
Snapshot, Data and Index files are cached in the sub-directories ``snapshots``,
|
|
|
|
``data`` and ``index``, as read from the repository.
|
|
|
|
|
|
|
|
Expiry
|
|
|
|
======
|
|
|
|
|
2022-05-07 20:23:59 +00:00
|
|
|
Whenever a cache directory for a repository is used, that directory's modification
|
2018-06-18 20:17:30 +00:00
|
|
|
timestamp is updated to the current time. By looking at the modification
|
2022-05-07 20:23:59 +00:00
|
|
|
timestamps of the repository cache directories it is easy to decide which directories
|
2018-06-18 20:17:30 +00:00
|
|
|
are old and haven't been used in a long time. Those are probably stale and can
|
|
|
|
be removed.
|