2
2
mirror of https://github.com/octoleo/restic.git synced 2024-06-03 09:30:50 +00:00

Clarify cache location documentation

PR #1287 changed the default cache location on darwin and windows.
Update the changelog and manual to reflect the new behavior.

Since the cache hasn't been included in an official release yet, I've
just changed the main cache changelog entry.

Fixes #1309
This commit is contained in:
Michael Pratt 2017-10-02 20:15:37 -07:00 committed by Alexander Neumann
parent abe6e0d22d
commit 5ab9e12b46
2 changed files with 14 additions and 10 deletions

View File

@ -7,10 +7,10 @@ Important Changes in 0.X.Y
* We've added a local cache for metadata so that restic doesn't need to load * We've added a local cache for metadata so that restic doesn't need to load
all metadata (snapshots, indexes, ...) from the repo each time it starts. By all metadata (snapshots, indexes, ...) from the repo each time it starts. By
default the cache is active, but there's a new global option `--no-cache` default the cache is active, but there's a new global option `--no-cache`
that can be used to disable the cache. The cache location is that can be used to disable the cache. By deafult, the cache a standard
`~/.cache/restic` by default, which can be overridden with `--cache-dir` or cache folder for the OS, which can be overridden with `--cache-dir`. The
the environment variable `XDG_CACHE_HOME`. The cache will automatically cache will automatically populate, indexes and snapshots are saved as they
populate, indexes and snapshots are saved as they are loaded. are loaded.
https://github.com/restic/restic/pull/1040 https://github.com/restic/restic/pull/1040
https://github.com/restic/restic/issues/29 https://github.com/restic/restic/issues/29
https://github.com/restic/restic/issues/738 https://github.com/restic/restic/issues/738

View File

@ -267,12 +267,16 @@ Caching
Restic keeps a cache with some files from the repository on the local machine. Restic keeps a cache with some files from the repository on the local machine.
This allows faster operations, since meta data does not need to be loaded from This allows faster operations, since meta data does not need to be loaded from
a remote repository. The cache is automatically created, usually in the a remote repository. The cache is automatically created, usually in an
directory ``.cache/restic`` in the user's home directory. The environment OS-specific cache folder:
variable ``XDG_CACHE_DIR`` or the command line parameter ``--cache-dir`` can
each be used to specify where the cache is located. The parameter * Linux/other: ``~/.cache/restic`` (or ``$XDG_CACHE_HOME/restic``)
``--no-cache`` disables the cache entirely. In this case, all data is loaded * macOS: ``~/Library/Caches/restic``
from the repo. * Windows: ``%LOCALAPPDATA%/restic``
The command line parameter ``--cache-dir`` can each be used to override the
default cache location. The parameter ``--no-cache`` disables the cache
entirely. In this case, all data is loaded from the repo.
The cache is ephemeral: When a file cannot be read from the cache, it is loaded The cache is ephemeral: When a file cannot be read from the cache, it is loaded
from the repository. from the repository.