Expand description
Where a library’s rebuildable caches live: by default inside the library
(<library>/.photovault/thumbnails and .../faces), or on this computer.
A library on an external hard drive keeps tens of thousands of small thumbnail and face-crop files, and spinning disks are slow at exactly that. Those files can always be rebuilt from the photos, so this computer may keep them on its own (usually much faster) disk instead. The database stays with the photos, so the library remains portable.
The choice belongs to the computer, not the library: it is kept in this computer’s settings under the library’s id. Another computer simply uses the copies inside the library, or rebuilds missing ones.
Stored paths never change (.photovault/thumbnails/...); they are
resolved here, so every reader and writer that goes through
crate::services::path_util::safe_join_relative,
thumbnails_dir or faces_dir follows the choice.
Constants§
- MOVABLE
- The caches that may move: rebuildable, many small files.
Functions§
- copy_
caches - Copy the movable caches from
fromtoto(each holdingthumbnails/andfaces/), skipping files already there at the same size. Stops early, without error, whencancelis set. Returns files copied. - default_
base - Where this computer keeps a library’s caches unless the user picks another folder.
- faces_
dir - Where face crops are written for this library.
- library_
id - This library’s id, made on first use. It names the library in this computer’s settings even when its drive letter or mount point changes.
- local_
base - The folder on this computer holding
root’s caches, if they moved. - place
- Keep
root’s caches inbasefrom now on, or (withNone) inside the library again. - thumbnails_
dir - Where thumbnails are written for this library.
Type Aliases§
- Copy
Progress - Progress through a copy: files done so far, and the total.