Skip to main content

Module cache

Module cache 

Source
Expand description

Freedesktop.org thumbnail cache directory, hashing, and validity rules. See https://specifications.freedesktop.org/thumbnail-spec/.

Functions§

cached_thumbnail_path
The path this app would use to cache a thumbnail for file_path inside cache_dir.
find_existing_thumbnail
Looks for a thumbnail already created by another application (file manager, etc.), checking freedesktop-standard cache sizes in order of preference.
is_cache_valid
A cached thumbnail is valid as long as it exists and is not older than the source file.
thumbnail_cache_dir
Returns (creating it if necessary) the freedesktop “normal” thumbnail cache directory.
thumbnail_hash
Computes the SHA1 hash of the file’s file:// URI, matching the hash used by pcmanfm and other freedesktop-compliant file managers for thumbnail cache keys.